etcd集群添加节点

查看当前集群节点信息

# etcdctl member list --write-out=table
+------------------+---------+--------------------+--------------------------------+-----------------------------------------------------+------------+
|        ID        | STATUS  |        NAME        |           PEER ADDRS           |                    CLIENT ADDRS                     | IS LEARNER |
+------------------+---------+--------------------+--------------------------------+-----------------------------------------------------+------------+
| 44d8bc3300880bcd | started | sht-sgmhadoopdn-01 | http://sht-sgmhadoopdn-01:2380 | http://10.0.0.1:2379,http://sht-sgmhadoopdn-01:2379 |      false |
| d446fbe3296eb85a | started | sht-sgmhadoopdn-03 | http://sht-sgmhadoopdn-03:2380 | http://10.0.0.1:2379,http://sht-sgmhadoopdn-02:2379 |      false |
| e9136c1ad1754783 | started | sht-sgmhadoopdn-02 | http://sht-sgmhadoopdn-02:2380 | http://10.0.0.1:2379,http://sht-sgmhadoopdn-02:2379 |      false |
+------------------+---------+--------------------+--------------------------------+-----------------------------------------------------+------------+

添加新节点sht-sgmhadoopdn-04(172.16.101.66)

添加集群节点对应hosts文件解析

# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
172.16.101.58    sht-sgmhadoopdn-01
172.16.101.59    sht-sgmhadoopdn-02
172.16.101.60    sht-sgmhadoopdn-03
172.16.101.66    sht-sgmhadoopdn-04

新节点配置etcd

配置文件etcd.conf

猜你喜欢

转载自www.cnblogs.com/ilifeilong/p/11625151.html