在 master 上进入 etcd 容器
docker exec -it $(docker ps -f name=etcd_etcd -q) /bin/sh
运行 etcdctl member list 查看成员信息
etcdctl --endpoints 127.0.0.1:2379 --cacert /etc/kubernetes/pki/etcd/ca.crt --cert /etc/kubernetes/pki/etcd/server.crt --key /etc/kubernetes/pki/etcd/server.key member list
输出如下
896d19d1d0a08f49, started, k8s-master0, https://10.0.1.81:2380, https://10.0.9.171:2379, false
发现 peer-urls(https://10.0.1.81:2380
) 配置不对,通过下面的命令完成修改
etcdctl --endpoints 127.0.0.1:2379 --cacert /etc/kubernetes/pki/etcd/ca.crt --cert /etc/kubernetes/pki/etcd/server.crt --key /etc/kubernetes/pki/etcd/server.key member update 896d19d1d0a08f49 --peer-urls=https://10.0.9.171:2380