firewall
-
cmd
--
zone
=
public
--
add
-
port
=
2379
/
tcp
--
permanent
firewall
-
cmd
--
zone
=
public
--
add
-
port
=
2380
/
tcp
--
permanent
firewall
-
cmd
--
reload
firewall
-
cmd
--
list
-
port
启动可能报错信息
master
-
16
etcd
[
25461
]:
request cluster ID
mismatch
(
got bdd7c7c32bde1208 want
698851
d67fea3c17
)
服务相关指令
systemctl daemon-reload
systemctl enable etcd
systemctl start etcd
systemctl status etcd
systemctl stop etcd
systemctl restart etcd
集群测试
各节点重启启动完成后,在任意节点执行
etcdctl member list
可列所有集群节点信息
etcdctl member list
etcdctl member list -w table
etcdctl endpoint health
etcdctl endpoint status
dockek容器里面操作etcd
下拉镜像
docker pull quay.io/coreos/etcd:v3.3.1
创建自定义网络
docker network create --subnet 172.19.0.0/16 ots
第一台主机
第二台主机
第三台主机
查看容器是否运行成功
启动三台主机
进入容器一
进入容器二
进入容器三
查看状态(主机一)
主机二
关闭一主机在查看