kubeadm join failing. Unable to request signed cert

淺唱寂寞╮ 提交于 2019-12-11 06:50:02

问题


I'm a bit confused by this, because it was working for days without issue.

I use to be able to join nodes to my cluster withoout issue. I would run the below on the master node:

kubeadm init .....

After that, it would generate a join command and token to issue to the other nodes I want to join. Something like this:

kubeadm join --token 99385f.7b6e7e515416a041 192.168.122.100

I would run this on the nodes, and they would join without issue. The next morning, all of a sudden this stopped working. This is what I see when I run the command now:

[kubeadm] WARNING: kubeadm is in alpha, please do not use it for 
production clusters.
[preflight] Running pre-flight checks
[tokens] Validating provided token
[discovery] Created cluster info discovery client, requesting info from "http://192.168.122.100:9898/cluster-info/v1/?token-id=99385f"
[discovery] Cluster info object received, verifying signature using given token
[discovery] Cluster info signature and contents are valid, will use API endpoints [https://192.168.122.100:6443]
[bootstrap] Trying to connect to endpoint https://192.168.122.100:6443
[bootstrap] Detected server version: v1.6.0-rc.1
[bootstrap] Successfully established connection with endpoint "https://192.168.122.100:6443"
[csr] Created API client to obtain unique certificate for this node, generating keys and certificate signing request
failed to request signed certificate from the API server [cannot create certificate signing request: the server could not find the requested resource]

It seems like the node I'm trying to join does successfully connect to the API server on the master node, but for some reason, it now fails to request a certificate.

Any thoughts?


回答1:


To me

sudo service kubelet restart

didn't work. What I did was the following:

  • Copied from master node contents of /etc/kubernetes/* into slave nodes at same location /etc/kubernetes

I tried again "kubeadm join ..." command. This time the nodes joined the cluster without any complaint.

I think this is a temporary hack, but worked!




回答2:


ok, I just stop and started kubelet on the master node as shown below, and things started working again:

sudo service kubelet stop
sudo service kubelet start

EDIT: This only seemed to work on time for me.



来源:https://stackoverflow.com/questions/43009758/kubeadm-join-failing-unable-to-request-signed-cert

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!