You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, kubeadm configures a kubelet with automatic rotation of client certificates by using the `/var/lib/kubelet/pki/kubelet-client-current.pem` symlink specified in `/etc/kubernetes/kubelet.conf`.
226
+
If this rotation process fails you might see errors such as `x509: certificate has expired or is not yet valid`
227
+
in kube-apserver logs. To fix the issue you must follow these steps:
228
+
229
+
1. Backup and delete `/etc/kubernetes/kubelet.conf` and `/var/lib/kubelet/pki/kubelet-client*` from the failed node.
230
+
1. From a working control plane node in the cluster that has `/etc/kubernetes/pki/ca.key` execute
231
+
`kubeadm kubeconfig user --org system:nodes --client-name system:node:$NODE > kubelet.conf`.
232
+
`$NODE`must be set to the name of the existing failed node in the cluster.
233
+
Modify the resulted `kubelet.conf` manually to adjust the cluster name and server endpoint,
234
+
or pass `kubeconfig user --config` (it accepts `InitConfiguration`). If your cluster does not have
235
+
the `ca.key` you must sign the embedded certificates in the `kubelet.conf` externally.
236
+
1. Copy this resulted `kubelet.conf` to `/etc/kubernetes/kubelet.conf` on the failed node.
237
+
1. Restart the kubelet (`systemctl restart kubelet`) on the failed node and wait for
238
+
`/var/lib/kubelet/pki/kubelet-client-current.pem`to be recreated.
239
+
1. Run `kubeadm init phase kubelet-finalize all` on the failed node. This will make the new
240
+
`kubelet.conf`file use `/var/lib/kubelet/pki/kubelet-client-current.pem` and will restart the kubelet.
241
+
1. Make sure the node becomes `Ready`.
223
242
## Default NIC When using flannel as the pod network in Vagrant
224
243
225
244
The following error might indicate that something was wrong in the pod network:
0 commit comments