Skip to content

Commit 6ea5318

Browse files
committed
kubeadm/TS guide: fix a misleading step about cert rotation
The "kubelet-finalize" step does not work on worker nodes, because commonly they do not have the cluster CA key and all "init" phases have a pre-step to check for the existence of the CA key, designating the cluster as one that uses external CA or not. Changing this behavior is complicated in kubeadm, thus manually instruct the user how to do edit the file and to restart the kubelet. This is already what we do in: https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-certs/#check-certificate-expiration
1 parent 3d826f0 commit 6ea5318

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

content/en/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,17 @@ the `ca.key` you must sign the embedded certificates in the `kubelet.conf` exter
224224
1. Copy this resulted `kubelet.conf` to `/etc/kubernetes/kubelet.conf` on the failed node.
225225
1. Restart the kubelet (`systemctl restart kubelet`) on the failed node and wait for
226226
`/var/lib/kubelet/pki/kubelet-client-current.pem` to be recreated.
227-
1. Run `kubeadm init phase kubelet-finalize all` on the failed node. This will make the new
228-
`kubelet.conf` file use `/var/lib/kubelet/pki/kubelet-client-current.pem` and will restart the kubelet.
227+
1. Manually edit the `kubelet.conf` to point to the rotated kubelet client certificates, by replacing
228+
`client-certificate-data` and `client-key-data` with:
229+
230+
```yaml
231+
client-certificate: /var/lib/kubelet/pki/kubelet-client-current.pem
232+
client-key: /var/lib/kubelet/pki/kubelet-client-current.pem
233+
```
234+
235+
1. Restart the kubelet.
229236
1. Make sure the node becomes `Ready`.
237+
230238
## Default NIC When using flannel as the pod network in Vagrant
231239

232240
The following error might indicate that something was wrong in the pod network:

0 commit comments

Comments
 (0)