这个操作常用于自动发现建立集群,然后在起来之后需要修改数据信息使用
[root@master1 ~]# etcdctl member list --endpoints="https://172.21.130.169:2379,https://172.21.130.168:2379,https://172.28.17.85:2379" --write-out=table
+------------------+---------+--------+-----------------------------+-----------------------------+------------+
| ID | STATUS | NAME | PEER ADDRS | CLIENT ADDRS | IS LEARNER |
+------------------+---------+--------+-----------------------------+-----------------------------+------------+
| 411e75b44efd27a5 | started | etcd-3 | https://172.28.17.85:2380 | https://172.28.17.85:2379 | false |
| 4c978cbca553cd70 | started | etcd-1 | https://172.21.130.169:2380 | https://172.21.130.169:2379 | false |
| cc0bba643b3d8ce1 | started | etcd-2 | https://172.21.130.168:2380 | https://172.21.130.168:2379 | false |
+------------------+---------+--------+-----------------------------+-----------------------------+------------+
更新etcd-3的peer-urls信息
[root@master1 ~]# etcdctl member update 411e75b44efd27a5 --peer-urls="https://127.0.0.1:2380" --endpoints="https://172.21.130.169:2379,https://172.21.130.168:2379"
Member 411e75b44efd27a5 updated in cluster 28d9bab5a0f18219
查看更新后的信息
[root@master1 ~]# etcdctl member list --endpoints="https://172.21.130.169:2379,https://172.21.130.168:2379,https://172.28.17.85:2379" --write-out=table
+------------------+---------+--------+-----------------------------+-----------------------------+------------+
| ID | STATUS | NAME | PEER ADDRS | CLIENT ADDRS | IS LEARNER |
+------------------+---------+--------+-----------------------------+-----------------------------+------------+
| 411e75b44efd27a5 | started | etcd-3 | https://127.0.0.1:2380 | https://172.28.17.85:2379 | false |
| 4c978cbca553cd70 | started | etcd-1 | https://172.21.130.169:2380 | https://172.21.130.169:2379 | false |
| cc0bba643b3d8ce1 | started | etcd-2 | https://172.21.130.168:2380 | https://172.21.130.168:2379 | false |
+------------------+---------+--------+-----------------------------+-----------------------------+------------+
针对,生活我不是想赢。我只是不想输!
浙公网安备 33010602011771号