More Info:
The RotateKubeletServerCertificate feature gate enables automatic rotation of the kubelet serving certificate. Enabling it ensures the kubelets server certificate is renewed before it expires.Risk Level
HighAddress
SecurityCompliance Standards
- CIS Kubernetes
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
On every control plane node, back up the current kube-controller-manager manifest:
-
Edit the kube-controller-manager static pod manifest to configure the feature gate:
If a
--feature-gates=argument already exists, edit that line instead (with a text editor such assudo vi /etc/kubernetes/manifests/kube-controller-manager.yaml) to ensure it includesRotateKubeletServerCertificate=truein the comma-separated list. -
Wait for the kube-controller-manager pod to be recreated (editing any file under
/etc/kubernetes/manifestscauses an automatic restart via the kubelet). You can watch for the new pod on any machine withkubectlaccess: -
Verify on each control plane node that the kube-controller-manager process now has the correct feature gate set:
Confirm the output includes
--feature-gates=RotateKubeletServerCertificate=true(or a--feature-gates=value that containsRotateKubeletServerCertificate=true).
Using kubectl
Using kubectl
kubectl cannot be used to enable
RotateKubeletServerCertificate because this setting is controlled via the kube-controller-manager static pod manifest on each control plane node. To remediate, edit /etc/kubernetes/manifests/kube-controller-manager.yaml on every control plane node as described in the Manual Steps section.Automation
Automation

