作者:xiaotian45123
1:服务器信息以及节点介绍
系统信息:centos1708 minimal 只修改IP地址
主机名称 | IP | 备注 |
---|---|---|
node01 | 192.168.150.181 | master and etcd |
rode02 | 192.168.150.182 | master and etcd |
node03 | 192.168.150.183 | master and etcd |
node04 | 192.168.150.184 | node |
VIP | 192.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