The principle and architecture diagram refer to the previous article, where only the operation steps are recorded.
ETCD version:3.2.11
Kube version:1.8.4
Docker Version:17.03.2-ce
OS Version:debian Stretch
Three ETCD nodes (Contiv plug-ins also use ETCD, where each node is multiplexed to run 2 instances of ETCD)
192.168.5.84 etcd0,contiv0192.168.5.85 etcd1,contiv1192.168.2.77 etcd2,contiv2
Two LVS nodes
192.168.2.56 master192.168.2.57 backup
4 x k8s nodes (3 master,1 node)
192.168.5.62 master01192.168.5.63 master02192.168.5.107 master03192.168.5.68 node
1, the deployment of ETCD, because these several nodes version is low, so did not use SYSTEMD
A, deploy the ETCD cluster used by k8s, start directly with the Etcd binary file, start the script as follows:
# cat etcd-start.sh# gets iplocalip= ' ifconfig em2|grep-w inet| awk ' {print $} ' |awk-f: ' {print $} ' pubip=0.0.0. 0# Start service Etcd--name etcd0-data-dir/var/lib/etcd--initial-advertise-peer-urls http://${localip}:2380--listen-peer-ur LS http://${localip}:2380--listen-client-urls http://${pubip}:2379--advertise-client-urls http://${pubip}:2379 I. Nitial-cluster-token My-etcd-token--initial-cluster etcd0=http://192.168.5.84:2380,etcd1=http:// 192.168.5.85:2380,etcd2=http://192.168.2.77:2380--initial-cluster-state new >>/var/log/etcd.log 2>&1 &
# cat etcd-start.sh# gets iplocalip= ' ifconfig em2|grep-w inet| awk ' {print $} ' |awk-f: ' {print $} ' pubip=0.0.0. 0# Start service Etcd--name etcd1-data-dir/var/lib/etcd--initial-advertise-peer-urls http://${localip}:2380--listen-peer-ur LS http://${localip}:2380--listen-client-urls http://${pubip}:2379--advertise-client-urls http://${pubip}:2379 I. Nitial-cluster-token My-etcd-token--initial-cluster etcd0=http://192.168.5.84:2380,etcd1=http:// 192.168.5.85:2380,etcd2=http://192.168.2.77:2380--initial-cluster-state new >>/var/log/etcd.log 2>&1 &
# cat etcd-start.sh#获取IPlocalip=`ifconfig bond0|grep -w inet| awk ‘{print $2}‘|awk -F: ‘{print $2}‘`pubip=0.0.0.0#启动服务etcd --name etcd2 -data-dir /var/lib/etcd --initial-advertise-peer-urls http://${localip}:2380 --listen-peer-urls http://${localip}:2380 --listen-client-urls http://${pubip}:2379 --advertise-client-urls http://${pubip}:2379 --initial-cluster-token my-etcd-token --initial-cluster etcd0=http://192.168.5.84:2380,etcd1=http://192.168.5.85:2380,etcd2=http://192.168.2.77:2380 --initial-cluster-state new >> /var/log/etcd.log 2>&1 &
Deploying Kubernetes1.8.4+contiv high-availability clusters