etcd: 3.3.11
查询出故障的节点
在正常节点上操作
export ETCDCTL_API=3
etcdctl --endpoints http://192.168.56.100:2379,http://192.168.56.101:2379 member list --write-out="table"export ETCDCTL_API=3
etcdctl --endpoints http://192.168.56.100:2379,http://192.168.56.101:2379 endpoint status --write-out="table"
假如出故障节点的 ID=9b3a3d0b383f52f1
集群中移除故障节点
在正常节点上操作
export ETCDCTL_API=3
etcdctl --endpoints http://192.168.56.100:2379,http://192.168.56.101:2379 --user=root:xxxxx member remove 9b3a3d0b383f52f1
9b3a3d0b383f52f1
修复故障节点
在故障节点上操作
sed -i "s/ETCD_INITIAL_CLUSTER_STATE=\"new\"/ETCD_INITIAL_CLUSTER_STATE=\"existing\"/g" /etc/etcd/etcd.confrm -rf /var/lib/etcd/data/*
重新添加节点
在正常节点上操作
exp