kubeadm join: couldn't validate the identity of the API Server

执行 kubeadm join 报如下错误:

error execution phase preflight: couldn't validate the identity of the API Server: abort connecting to API servers after timeout of 5m0s

出现该问题可能有多种原因:

1. token 过期

此时需要通过 kubedam 重新生成 token

kubeadm token create --print-join-command

2. k8s api server 不可达

笔者遇到的正是这种情况,此时需要检查和关闭节点的 firewalld 和 selinux

setenforce 0
sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config
systemctl disable firewalld --now
发布了272 篇原创文章 · 获赞 93 · 访问量 39万+

猜你喜欢

转载自blog.csdn.net/shida_csdn/article/details/105122647