Kubeadm加入新master節點報錯:error execution phase check-etcd: etcd cluster is not healthy: failed to dial endpoint https://192.168.80.13:2379 with maintenance client: context deadline exceeded
阿新 • • 發佈:2021-08-25
查詢etcd相關pod
kubectl get pod -n kube-system
進入
kubectl exec -ti etcd-k8s-master01 -n kube-system sh
export ETCDCTL_API=3
etcdctl --cacert="/etc/kubernetes/pki/etcd/ca.crt" --cert="/etc/kubernetes/pki/etcd/server.crt" --key="/etc/kubernetes/pki/etcd/server.key" member list
查詢到如下資訊
17826e460c060952, started, k8s-master03, https://192.168.80.13:2380, https://192.168.80.13:2379, false 195fbcb8c0d5200f, started, k8s-master01, https://192.168.80.11:2380, https://192.168.80.11:2379, false 87d1f390fdb73c30, started, k8s-master02, https://192.168.80.12:2380, https://192.168.80.12:2379, false
將出問題的k8s-master03節點移除
etcdctl --cacert="/etc/kubernetes/pki/etcd/ca.crt" --cert="/etc/kubernetes/pki/etcd/server.crt" --key="/etc/kubernetes/pki/etcd/server.key" member remove 17826e460c060952
再重新執行節點加入命令,顯示加入成功
每個人都有潛在的能量,只是很容易被習慣所掩蓋,被時間所迷離,被惰性所消磨~