![](https://csdnimg.cn/release/download_crawler_static/86336721/bg4.jpg)
--name=etcd2 \
--cert-file=/etc/kubernetes/ssl/etcd.pem \
--key-file=/etc/kubernetes/ssl/etcd-key.pem \
--peer-cert-file=/etc/kubernetes/ssl/etcd.pem \
--peer-key-file=/etc/kubernetes/ssl/etcd-key.pem \
--trusted-ca-file=/etc/kubernetes/ssl/ca.pem \
--peer-trusted-ca-file=/etc/kubernetes/ssl/ca.pem \
--initial-advertise-peer-urls=https://192.168.12.101:2380 \
--listen-peer-urls=https://192.168.12.101:2380 \
--listen-client-urls=https://192.168.12.101:2379,http://127.0.0.1:2379 \
--advertise-client-urls=https://192.168.12.101:2379 \
--initial-cluster-token=k8s-etcd-cluster \
--initial-
cluster=etcd1=https://192.168.12.1:2380,etcd2=https://192.168.12.101:2380,etcd3=https://192.1
68.12.102:2380,etcd4=https://192.168.12.103:2380,etcd5=https://192.168.12.104:2380,etcd6=http
s://192.168.12.105:2380,etcd7=https://192.168.12.106:2380,etcd8=https://192.168.12.107:2380,e
tcd9=https://192.168.12.108:2380,etcd10=https://192.168.12.109:2380 \
--initial-cluster-state=new \
--data-dir=/var/lib/etcd
Restart=on-failure
RestartSec=5
LimitNOFILE=65536
[Install]
WantedBy=multi-user.target
# etc3-etc10 以此类推
2.4 启动 etcd
systemctl daemon-reload
systemctl enable etcd
systemctl start etcd
systemctl status etcd
2.5 验证 etcd 集群状态
etcdctl --endpoints=
https://192.168.12.101:2379,https://192.168.12.101:2379,https://192.168.12.102:2379,https://1
92.168.12.103:2379,https://192.168.12.104:2379,https://192.168.12.105:2379,https://192.168.12