etcd 增减节点

时间:2021-12-13 02:32:05

一、查看集群节点

etcdctl --endpoint=https://10.2.0.6:2379 --ca-file=/etc/etcd/ca.pem --cert-file=/etc/etcd/client.pem --key-file=/etc/etcd/client-key.pem member list

二、允许集群新增节点

kubectl member add <name> <peer-url>

三、启动新节点

--initial-cluster-state=existing

四、删除节点

etcdctl member remove c80cd07cd38b1e10

其中 c80cd07cd38b1e10 是老节点在集群中的id