2020-10-21

ETCD:Dynamically REMOVE a node from the cluster

root@srv113:/# cd /;date; etcd-members.sh; etcdctl cluster-health
Wed Oct 21 08:52:45 +07 2020
..
ETCD MEMBERs: 
1b1776006795f774: name=etcd1 peerURLs=http://10.0.2.111:2380 clientURLs=http://10.0.2.111:2379 isLeader=true
89df995ba1c163a3: name=etcd3 peerURLs=http://10.0.2.113:2380 clientURLs=http://10.0.2.113:2379 isLeader=false
9e01e0d9b238a128: name=etcd2 peerURLs=http://10.0.2.112:2380 clientURLs=http://10.0.2.112:2379 isLeader=false
ea59efe5cd5e204e: name=etcd4 peerURLs=http://etcd4:2380 clientURLs=http://10.0.2.114:2379 isLeader=false
member 1b1776006795f774 is healthy: got healthy result from http://10.0.2.111:2379
member 89df995ba1c163a3 is healthy: got healthy result from http://10.0.2.113:2379
member 9e01e0d9b238a128 is healthy: got healthy result from http://10.0.2.112:2379
member ea59efe5cd5e204e is healthy: got healthy result from http://10.0.2.114:2379
cluster is healthy
root@srv113:/# 



root@srv113:/# etcdctl member remove ea59efe5cd5e204e
Removed member ea59efe5cd5e204e from cluster
root@srv113:/# 


root@srv113:/# cd /;date; etcd-members.sh; etcdctl cluster-health
Wed Oct 21 08:55:27 +07 2020
..
ETCD MEMBERs: 
1b1776006795f774: name=etcd1 peerURLs=http://10.0.2.111:2380 clientURLs=http://10.0.2.111:2379 isLeader=true
89df995ba1c163a3: name=etcd3 peerURLs=http://10.0.2.113:2380 clientURLs=http://10.0.2.113:2379 isLeader=false
9e01e0d9b238a128: name=etcd2 peerURLs=http://10.0.2.112:2380 clientURLs=http://10.0.2.112:2379 isLeader=false
member 1b1776006795f774 is healthy: got healthy result from http://10.0.2.111:2379
member 89df995ba1c163a3 is healthy: got healthy result from http://10.0.2.113:2379
member 9e01e0d9b238a128 is healthy: got healthy result from http://10.0.2.112:2379
cluster is healthy
root@srv113:/# 

No comments:

Post a Comment