执行 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

本文解决kubeadm join过程中遇到的错误,主要针对token过期和k8s apiserver不可达的问题,提供了重新生成token和调整节点防火墙及selinux设置的方法。
2897

被折叠的 条评论
为什么被折叠?



