Deploying Kubernetes1.8.4+contiv high-availability clusters

Source: Internet
Author: User
Tags etcd k8s

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.