Simple configuration Etcd cluster 3.0 3 nodes ip 192.168.134.140 192.168.134.141 192.168.134.1423.1 download etcd Curl -l https://github.com/coreos/etcd/releases/download/v2.3.6/etcd-v2.3.6-linux-amd64.tar.gz -o etcd-v2.3.6-linux-amd64.tar.gz3.2 tar xzvf etcd-v2.3.6-linux-amd64.tar.gz && cd etcd-v2.3.6-linux-amd643.3 mv etcd etcdctl /bin3.4 New Catalog mkdir -p /data/etcddata (storing ETCD data) 3.5 execute command on 192.168.134.140 etcd -name etcd0 -initial-advertise-peer-urls http://192.168.134.140:2380 -listen-peer-urls http:// 192.168.134.140:2380 -listen-client-urls http://192.168.134.140:2379,http://127.0.0.1:2379 - advertise-client-urls http://192.168.134.140:2379 -initial-cluster-token my-etcd-cluster - initial-cluster etcd0=http://192.168.134.140:2380,etcd1=http://192.168.134.141:2380,etcd2=http:// 192.168.134.142:2380 --data-dir=/data/etcddata -initial-cluster-state new &
3.6 executes the command on 192.168.134.141 etcd -name etcd1 -initial-advertise-peer-urls http:// 192.168.134.141:2380 -listen-peer-urls http://192.168.134.141:2380 -listen-client-urls http://192.168.134.141:2379,http://127.0.0.1:2379 -advertise-client-urls http://192.168.134.141:2379 -initial-cluster-token my-etcd-cluster -initial-cluster etcd0=http://192.168.134.140:2380 , etcd1=http://192.168.134.141:2380,etcd2=http://192.168.134.142:2380 --data-dir=/data/etcddata - Initial-cluster-state new &
3.7 Execute command on 192.168.134.142 etcd-name etcd2-initial-advertise-peer-urls http://192.168.134.142:2380-listen-peer-urls Http://192.168.134.142:2380-listen-client-urls http://192.168.134.142:2379,http://127.0.0.1:2379- Advertise-client-urls Http://192.168.134.142:2379-initial-cluster-token My-etcd-cluster-initial-cluster etcd0= http://192.168.134.140:2380,etcd1=http://192.168.134.141:2380,etcd2=http://192.168.134.142:2380--data-dir=/ Data/etcddata-initial-cluster-state New & Note: Start the above 3 commands screen will brush the log, shut down the terminal, re-open an SSH connection, use the command to check whether the ETCD cluster is normal etcdctl Cluster-health Normal condition
This article is from the "Last Night Rain Wind Sudden" blog, please be sure to keep this source http://zxx287856774.blog.51cto.com/3417296/1811732
Configuring ETCD Clusters