192.168.72.39
Created symlink from /etc/systemd/system/multi-user.target.wants/etcd.service to /etc/systemd/system/etcd.service.
Job for etcd.service failed because a timeout was exceeded. See "systemctl status etcd.service" and "journalctl -xe"for details.
192.168.72.40
Created symlink from /etc/systemd/system/multi-user.target.wants/etcd.service to /etc/systemd/system/etcd.service.
Active: active (running) since Sat 2021-02-13 00:27:24 CST; 16ms ago
192.168.72.41
Created symlink from /etc/systemd/system/multi-user.target.wants/etcd.service to /etc/systemd/system/etcd.service.
Active: active (running) since Sat 2021-02-13 00:27:25 CST; 6ms ago
1.2.6、验证etcd集群状态
在k8s-01机器执行就可以了,既然是集群,在哪执行,都是可以获取到信息的
#!/usr/bin/env bashsource /opt/k8s/bin/k8s-env.sh
for host in${ETCD_IPS[@]}doprintf"\e[1;34m${host}\e[0m\n"
ETCDCTL_API=3 /opt/k8s/bin/etcdctl \
--endpoints=https://${host}:2379 \
--cacert=/etc/kubernetes/cert/ca.pem \
--cert=/etc/etcd/cert/etcd.pem \
--key=/etc/etcd/cert/etcd-key.pem endpoint health
done
如下显示successfully committed proposal则表示集群正常
192.168.72.39
https://192.168.72.39:2379 is healthy: successfully committed proposal: took = 9.402229ms
192.168.72.40
https://192.168.72.40:2379 is healthy: successfully committed proposal: took = 10.247073ms
192.168.72.41
https://192.168.72.41:2379 is healthy: successfully committed proposal: took = 11.01422ms