部署环境
centos7操作系统
3台主机
10.10.125.68 master
10.10.125.69 node
10.10.125.71 node
查看版本
master
Client Version: version.Info{Major:"1", Minor:"2", GitVersion:"v1.2.0", GitCommit:"ec7364b6e3b155e78086018aa644057edbe196e5", GitTreeState:"clean"}
Server Version: version.Info{Major:"1", Minor:"2", GitVersion:"v1.2.0", GitCommit:"ec7364b6e3b155e78086018aa644057edbe196e5", GitTreeState:"clean"}
node
0.5.3
[
root@localhost ~]# docker version
Client:
Version: 1.10.3
API version: 1.22
Package version: docker-common-1.10.3-59.el7.centos.x86_64
Go version: go1.6.3
Git commit: 3999ccb-unsupported
Built: Thu Dec 15 17:24:43 2016
OS/Arch: linux/amd64
Server:
Version: 1.10.3
API version: 1.22
Package version: docker-common-1.10.3-59.el7.centos.x86_64
Go version: go1.6.3
Git commit: 3999ccb-unsupported
Built: Thu Dec 15 17:24:43 2016
OS/Arch: linux/amd64
安装过程
1、安装CentOS-7-x86_64-DVD-1511.iso操作系统,确定好时区
2、配置ip master192.168.25.10,node192.168.25.11 ,node2192.168.25.12
3、配置/etc/hosts
4、配置/etc/hostname
5、配置http代理
vi /etc/profile
export http_proxy="http://xiao.yang:Zxy*1109@192.168.2.49:8080"
export https_proxy="http://xiao.yang:Zxy*1109@192.168.2.49:8080"
export no_proxy="localhost,127.0.0.1,10.10.*.*,.neusoft.com"
生效
source /etc/profile
export
6、配置好yum源【只保留这一个文件】
/etc/yum.repos.d
3、安装ntp服务端,保持时间一致
#
yum -y install ntp ntpdate
#cp /etc/ntp.conf /etc/ntp.conf.bak
#mv /etc/ntp.conf /etc/ntp.conf.bak
#vi /etc/ntp.conf
driftfile /var/lib/ntp/drift
server time.neusoft.com
----添加为服务
chkconfig --level 345 ntpd on
----启动
service ntpd start
5、关闭本地防火墙并设置开机不自启动
# systemctl stop firewalld.service
# systemctl disable firewalld.service
6、关闭本地selinux防火墙
# vi /etc/sysconfig/selinux
SELINUX=disabled
# setenforce 0
7、安装ifconfig工具
-bash: ifconfig: command not found
# yum install net-tools -y
9、配置docker http代理和加速器
10、master 安装
yum -y install etcd kubernetes-master 【默认安装】
yum -y install etcd kubernetes-master-1.2*【安装1.2版本】
[
root@localhost ~]#
vi /etc/kubernetes/controller-manager
###
# The following values are used to configure the kubernetes controller-manager
# defaults from config and apiserver should be adequate
# Add your own!
KUBE_CONTROLLER_MANAGER_ARGS=""
KUBE_CONTROLLER_MANAGER_ARGS="--node-monitor-grace-period=10s --pod-eviction-timeout=10s"
[
root@localhost ~]#
vi /etc/kubernetes/apiserver
###
# kubernetes system config