Skip to main content

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

High

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. On every control plane node, back up the current kube-controller-manager manifest:
  2. 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 as sudo vi /etc/kubernetes/manifests/kube-controller-manager.yaml) to ensure it includes RotateKubeletServerCertificate=true in the comma-separated list.
  3. Wait for the kube-controller-manager pod to be recreated (editing any file under /etc/kubernetes/manifests causes an automatic restart via the kubelet). You can watch for the new pod on any machine with kubectl access:
  4. 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 contains RotateKubeletServerCertificate=true).
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.