More Info:
Enable kubelet server certificate rotation on controller-manager.Risk Level
LowAddress
SecurityCompliance Standards
- CIS Kubernetes
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
On every control plane node, open the kube-controller-manager static pod manifest for editing:
-
In the
spec.containers[0].commandlist, ensure there is a--feature-gates=entry that includesRotateKubeletServerCertificate=true.- If
--feature-gatesdoes not exist, add a new line under the other--flags, for example: - If
--feature-gatesalready exists, appendRotateKubeletServerCertificate=trueto the comma-separated list, for example:
- If
- Save the file and exit the editor. The kube-controller-manager static pod will be automatically restarted by the kubelet on that control plane node due to the manifest change.
-
Wait for the kube-controller-manager pod to restart and become Running (from any machine with kubectl access):
Press
Ctrl+Conce the relevant pod is inRunningstate and no longer restarting. -
On each control plane node, verify the kube-controller-manager process includes the correct feature gate:
Confirm the output contains a
--feature-gates=argument withRotateKubeletServerCertificate=truepresent in its value.
Using kubectl
Using kubectl
kubectl cannot modify the kube-controller-manager static pod manifest or its process flags on the control plane node. To enable
RotateKubeletServerCertificate, you must edit /etc/kubernetes/manifests/kube-controller-manager.yaml directly on every control plane node; follow the guidance in the Manual Steps section.Automation
Automation

