Skip to main content

More Info:

Enable kubelet server certificate rotation on controller-manager.

Risk Level

Low

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. On every control plane node, open the kube-controller-manager static pod manifest for editing:
  2. In the spec.containers[0].command list, ensure there is a --feature-gates= entry that includes RotateKubeletServerCertificate=true.
    • If --feature-gates does not exist, add a new line under the other -- flags, for example:
    • If --feature-gates already exists, append RotateKubeletServerCertificate=true to the comma-separated list, for example:
  3. 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.
  4. Wait for the kube-controller-manager pod to restart and become Running (from any machine with kubectl access):
    Press Ctrl+C once the relevant pod is in Running state and no longer restarting.
  5. On each control plane node, verify the kube-controller-manager process includes the correct feature gate:
    Confirm the output contains a --feature-gates= argument with RotateKubeletServerCertificate=true present in its value.
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.

Additional Reading: