Skip to main content

More Info:

Enabling the RotateKubeletServerCertificate feature gate lets the kubelet automatically request and rotate its serving certificate, avoiding the use of expired or long-lived server certificates.

Risk Level

High

Address

Security

Compliance Standards

  • CIS EKS

Triage and Remediation

Remediation

Manual Steps

  1. On every worker node, check how kubelet is configured:
    Review the command line for any --config flag (config file) and any --rotate-kubelet-server-certificate flag (exec arg override).
  2. If using a kubelet config file (recommended), edit it and enable the feature gate (example path from finding):
    If featureGates is not present, add this block under the top-level YAML:
featureGates: RotateKubeletServerCertificate: true EOF
If you see --rotate-kubelet-server-certificate=false in /etc/systemd/system/kubelet.service.d/10-kubelet-args.conf, edit it:
Or remove the flag entirely so the config file controls it.
  1. If you are configuring kubelet only with executable arguments (no config file referenced in the ps output), append the flag in the systemd drop-in (create or edit as needed):
[Service] Environment=“KUBELET_ARGS=—rotate-kubelet-server-certificate=true” EOF
  1. Verify kubelet is running with the correct setting on the worker node:
    Confirm either that --rotate-kubelet-server-certificate=true appears in the command line, or that no --rotate-kubelet-server-certificate=false flag is present and the config file has RotateKubeletServerCertificate: true.
kubectl cannot be used to enable RotateKubeletServerCertificate because this setting is applied via kubelet host-level configuration (/var/lib/kubelet/config.yaml, /etc/kubernetes/kubelet/kubelet-config.json, and the kubelet systemd unit) on every worker node. To remediate this finding, make the changes directly on each node as described in the Manual Steps section.