首页新闻找找看学习计划

k8s 集群 worker 节点无法加入节点

0
悬赏园豆:30 [待解决问题]

k8s 版本是 1.17.0 ,用的是 calico 网络,加入集群时卡在下面的地方:

[kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap...
[kubelet-check] Initial timeout of 40s passed.

journalctl -xeu kubelet 查看日志,发现下面的错误:

Jan 05 15:35:53 k8s-node5 kubelet[8659]: E0105 15:35:53.781000    8659 kubelet.go:2263] node "k8s-node5" not found
Jan 05 15:35:53 k8s-node5 kubelet[8659]: E0105 15:35:53.800421    8659 reflector.go:156] k8s.io/client-go/informers/factory.go:135: Failed to list *v1beta1.CSIDriver: csidrivers.storage.k8s.io is forbidde

请问如何解决这个问题?

k8s
问题补充:

重新加入,等到 "Unfortunately, an error has occurred: timed out waiting for the condition" 错误时查看 kubelet 日志发现下面的错误:

Jan 05 16:01:03 k8s-node5 kubelet[23099]: E0105 16:01:03.197834   23099 bootstrap.go:240] unable to read existing bootstrap client config: invalid configuration: [unable to read client-cert /var/lib/kubel
Jan 05 16:01:03 k8s-node5 kubelet[23099]: F0105 16:01:03.197873   23099 server.go:273] failed to run Kubelet: unable to load bootstrap kubeconfig: stat /etc/kubernetes/bootstrap-kubelet.conf: no such file

改为 --v=6 加入集群,控制台日志出现 "Skipping certs download" 以及很多 "Config loaded from file"

controlplaneprepare.go:211] [download-certs] Skipping certs download
...
[kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap...
I0106 17:06:44.333442   20439 loader.go:375] Config loaded from file:  /etc/kubernetes/kubelet.conf
I0106 17:06:44.832722   20439 loader.go:375] Config loaded from file:  /etc/kubernetes/kubelet.conf
I0106 17:06:45.332732   20439 loader.go:375] Config loaded from file:  /etc/kubernetes/kubelet.conf
....
dudu的主页 dudu | 高人七级 | 园豆:39250
提问于:2020-01-05 15:52

用1台新的服务器全新安装 k8s 后加入机器也是同样的问题

dudu 5个月前
< >
分享
所有回答(1)
0

是使用的root用户执行加入集群命令,并且加入的discovery-token-ca-cert-hashtoken都确认没有过期吗

kebyn | 园豆:208 (菜鸟二级) | 2020-01-08 19:53

没有过期

支持(0) 反对(0) dudu | 园豆:39250 (高人七级) | 2020-01-08 21:53
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册