kubeadm安装Kubernetes V1.10集群详细文档

作者:xiaotian45123

1:服务器信息以及节点介绍

系统信息:centos1708 minimal    只修改IP地址

主机名称IP备注
node01192.168.150.181master and etcd
rode02192.168.150.182master and etcd
node03192.168.150.183master and etcd
node04192.168.150.184node
VIP192.168.150.186

软件版本:

docker17.03.2-ce

socat-1.7.3.2-2.el7.x86_64
kubelet-1.10.0-0.x86_64
kubernetes-cni-0.6.0-0.x86_64
kubectl-1.10.0-0.x86_64
kubeadm-1.10.0-0.x86_64

1:环境初始化

1:分别在4台主机设置主机名称

hostnamectl set-hostname node01
hostnamectl set-hostname node02
hostnamectl set-hostname node03
hostnamectl set-hostname node04

2:配置主机映射

cat  /tmp/crontab2.tmp
crontab /tmp/crontab2.tmp
systemctl start ntpdate.service
 
echo "* soft nofile 65536" >> /etc/security/limits.conf
echo "* hard nofile 65536" >> /etc/security/limits.conf
echo "* soft nproc 65536"  >> /etc/security/limits.conf
echo "* hard nproc 65536"  >> /etc/security/limits.conf
echo "* soft  memlock  unlimited"  >> /etc/security/limits.conf
echo "* hard memlock  unlimited"  >> /etc/security/limits.conf

2:安装、配置keepalived(主节点)

1:安装keepalived

yum install -y keepalived
systemctl enable keepalived

node01的keepalived.conf

cat