etcd单机集群(静态无发现无证书)-成都快上网建站

etcd单机集群(静态无发现无证书)

setenforce0

网站建设哪家好,找创新互联建站!专注于网页设计、网站建设、微信开发、微信小程序开发、集团企业网站建设等服务项目。为回馈新老客户创新互联还提供了田东免费建站欢迎大家使用!

 

Install  go

#cd /opt && wget https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz

#tar -C /usr/local -xzf go1.8.3.linux-amd64.tar.gz

#exportPATH=$PATH:/usr/local/go/bin

 

go -h

 

 

 

Installdocker

apt install docker.io  docker

docker p_w_picpaths

 

 

 

install etcd cluster on local

需要1.8版本以上的go

 

git clone https://github.com/coreos/etcd.git

 

cd /etcd && ./build

cp /bin/* /usr/sbin/.

 

 

etcd -name etcd01 --data-dir /data1 \

 --initial-advertise-peer-urls http://10.1.1.42:2380 \

 --listen-peer-urls http://10.1.1.42:2380 \

 --listen-client-urls http://10.1.1.42:2379,http://127.0.0.1:2379 \

 --advertise-client-urls http://10.1.1.42:2379 \

 --initial-cluster-token etcd-cluster \

 --initial-clusteretcd01=http://10.1.1.42:2380,etcd02=http://10.1.1.42:12380,etcd03=http://10.1.1.42:22380\

 --initial-cluster-state new

 

 

etcd -name etcd02 --data-dir /data2 \

 --initial-advertise-peer-urls http://10.1.1.42:12380 \

 --listen-peer-urls http://10.1.1.42:12380 \

 --listen-client-urls http://10.1.1.42:12379,http://127.0.0.1:12379 \

 --advertise-client-urls http://10.1.1.42:12379 \

 --initial-cluster-token etcd-cluster \

 --initial-clusteretcd01=http://10.1.1.42:2380,etcd02=http://10.1.1.42:12380,etcd03=http://10.1.1.42:22380\

 --initial-cluster-state new

 

etcd -name etcd03 --data-dir /data3 \

 --initial-advertise-peer-urls http://10.1.1.42:22380 \

 --listen-peer-urls http://10.1.1.42:22380 \

 --listen-client-urls http://10.1.1.42:22379,http://127.0.0.1:22379 \

 --advertise-client-urls http://10.1.1.42:22379 \

 --initial-cluster-token etcd-cluster \

 --initial-clusteretcd01=http://10.1.1.42:2380,etcd02=http://10.1.1.42:12380,etcd03=http://10.1.1.42:22380\

 --initial-cluster-state new

 

 

验证etcd

etcdctl member list


本文题目:etcd单机集群(静态无发现无证书)
文章地址:http://kswjz.com/article/igdgoj.html
扫二维码与项目经理沟通

我们在微信上24小时期待你的声音

解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流