一、环境准备
1,准备好多台主机,(系统分区,网络,等都规划好),系统时间确认,关闭SELinux
1,修改主机名
2、 关闭swap分区
打开ip-forward
cat <<EOF > /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-ip6tables = 1 \
net.bridge.bridge-nf-call-iptables = 1 \
net.ipv4.ip_forward = 1 \
vm.swappiness = 0 \
EOF
-----
加载ipvs模块
cat > /etc/sysconfig/modules/ipvs.modules << EOF
#!/bin/bash
modprobe -- ip_vs
modprobe -- ip_vs_rr
modprobe -- ip_vs_wrr
modprobe -- ip_vs_sh
modprobe -- nf_conntrack_ipv4
EOF
chmod 755 /etc/sysconfig/modules/ipvs.modules && /etc/sysconfig/modules/ipvs.modules && lsmod | grep -e ip_vs -e nf_conntrack_ipv4
----------
安装Docker
yum update
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum list docker-ce --showduplicates | sort -r
yum install docker-ce-17.12.1.ce