Score:0

Kuberentes kubelet-client-current.pem expired

us flag

I'm new in K8s and I'm facing a problem with certificate. 1.13 version is used. One of the worker nodes is in NotReady status. I check logs and it turned out that:

Part of the existing bootstrap client certificate is expired
Using bootstrap kubeconfig to generate TLS client cert, key and kubeconfig file
Loading cert/key pair from "/var/lib/kubelet/pki/kubelet-client-current.pem"
Failed to connect to apiserver: the server has asked for the client to provide credentials

I checked and indeed kubelet-client-current.pem is pointing to expired certificate. My question is how to renew this kubelet-client-<current_date>.pem file.

EDIT:
I read that for this current cert: The initial validity period is one year. When the certificate is about to expire, it is automatically renewed and the validity period is extended by one year. Is there any way to create it manually? Or how to force kubeadm to do it?

I also deleted /var/lib/kubelet/pki and after kubelet restart it was recreated but only with kubelet-client.key.tmp, kubelet.crt, kubelet.key.

Score:0
us flag

Finally I was able to renew this certificate. Solution is described under https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm/#kubelet-client-cert

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.