码迷,mamicode.com
首页 > 其他好文 > 详细

etcd 添加、删除节点操作。非k8s情况

时间:2019-10-29 00:51:23      阅读:146      评论:0      收藏:0      [点我收藏+]

标签:move   href   als   app   服务   节点   交互   etcd   etc   

非k8s情况下,维护etcd,手动添加、删除节点

注意:4001为对外提供服务的端口,7001为节点间交互的借口

/export/App/etcd-v3.3.12/etcdctl --endpoints="http://172.28.178.53:4001,http://172.28.178.70:4001,http://172.28.178.34:4001" member add etcd2 http://11.5.104.2:7001

/export/App/etcd-v3.3.12/etcdctl --endpoints="http://172.28.178.53:4001,http://172.28.178.70:4001,http://172.28.178.34:4001" member remove 82fdb722eb9d638b (remove中的id 为meber list中显示的id,)

查看节点:
/export/App/etcd-v3.3.12/etcdctl --endpoints="http://172.28.178.53:4001,http://172.28.178.70:4001,http://172.28.178.34:4001" member list
26696069f6492b5e: name=etcd53 peerURLs=http://172.28.178.53:7001 clientURLs=http://172.28.178.53:4001 isLeader=false
83123c99177d962b: name=etcd9 peerURLs=http://11.5.103.9:7001 clientURLs=http://11.5.103.9:4001 isLeader=false
83d86e01a34a6415: name=etcd2 peerURLs=http://11.5.104.2:7001 clientURLs=http://11.5.104.2:4001 isLeader=false
cea02eff3b4e6b62: name=etcd70 peerURLs=http://172.28.178.70:7001 clientURLs=http://172.28.178.70:4001 isLeader=true
eb3de7b5e5f2cdca: name=etcd34 peerURLs=http://172.28.178.34:7001 clientURLs=http://172.28.178.34:4001 isLeader=false

查看节点状态:
[root@A01-R04-I178-34-7254361 ~]# /export/App/etcd-v3.3.12/etcdctl --endpoints="http://172.28.178.53:4001,http://172.28.178.70:4001,http://172.28.178.34:4001" cluster-health
member 26696069f6492b5e is healthy: got healthy result from http://172.28.178.53:4001
member 83123c99177d962b is healthy: got healthy result from http://11.5.103.9:4001
member 83d86e01a34a6415 is healthy: got healthy result from http://11.5.104.2:4001
member cea02eff3b4e6b62 is healthy: got healthy result from http://172.28.178.70:4001
member eb3de7b5e5f2cdca is healthy: got healthy result from http://172.28.178.34:4001
cluster is healthy

etcd 添加、删除节点操作。非k8s情况

标签:move   href   als   app   服务   节点   交互   etcd   etc   

原文地址:https://blog.51cto.com/11142614/2445914

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!