查看
/opt/etcd/bin/etcdctl --cacert=/opt/etcd/ssl/ca.pem \
--cert=/opt/etcd/ssl/server.pem \
--key=/opt/etcd/ssl/server-key.pem \
--endpoints="https://172.16.16.160:2379,https://172.16.16.161:2379,https://172.16.16.162:2379" endpoint health
/opt/etcd/bin/etcdctl --cacert=/opt/etcd/ssl/ca.pem \
--cert=/opt/etcd/ssl/server.pem \
--key=/opt/etcd/ssl/server-key.pem \
--endpoints="https://172.16.16.160:2379,https://172.16.16.161:2379,https://172.16.16.162:2379" member list --write-out=table
原有的节点
![](https://img2020.cnblogs.com/blog/1334255/202108/1334255-20210825162116908-182233476.png)
新增节点 etcd4
/opt/etcd/bin/etcdctl --cacert=/opt/etcd/ssl/ca.pem --cert=/opt/etcd/ssl/server.pem --key=/opt/etcd/ssl/server-key.pem --endpoints="https://172.16.16.160:2379,https://172.16.16.161:2379,https://172.16.16.162:2379" member add etcd-4 --peer-urls="https://172.16.16.163:2380"
Member 8e26a4b8cd5ac400 added to cluster 2e3e7a133ec762f7
# 输出下面信息,确保下面信息在 etcd-4 上进行配置
ETCD_NAME="etcd-4"
ETCD_INITIAL_CLUSTER="etcd-1=https://172.16.16.160:2380,etcd-2=https://172.16.16.161:2380,etcd-3=https://172.16.16.162:2380,etcd-4=https://172.16.16.163:2380"
ETCD_INITIAL_ADVERTISE_PEER_URLS="https://172.16.16.163:2380"
ETCD_INITIAL_CLUSTER_STATE="existing"
``
## 注意:因为我们使用了 ssl 证书,所以证书中必须已经有了 172.16.16.163 这 IP,否则无法成功加入
## 新增 etcd 节点,启动即可
参考:
https://www.cnblogs.com/ilifeilong/p/11625151.html
https://www.cnblogs.com/klvchen/articles/14998100.html