Skip to main content

More Info:

Enabling certificate rotation lets the kubelet automatically renew its client certificates before they expire, reducing the risk of using long-lived or expired credentials.

Risk Level

High

Address

Security

Compliance Standards

  • CIS EKS

Triage and Remediation

Remediation

Manual Steps

  1. On every worker node, back up the kubelet configuration and systemd drop-in files:
  1. Edit /var/lib/kubelet/config.yaml to enable certificate rotation (YAML key name is case-sensitive to your deployment; if rotateCertificates exists, set it to true, otherwise add it under the top-level kubeletConfiguration block):
Ensure it contains:
  1. Edit the kubelet systemd drop-in to ensure no flag disables rotation:
In the KUBELET_ARGS (or Environment="KUBELET_ARGS=...") line:
  • Remove any occurrence of --rotate-certificates=false.
  • If you manage kubelet only via flags and not config file, ensure --rotate-certificates=true is present, for example:
  1. Reload systemd and restart kubelet (this restarts kubelet and may briefly impact node status/workloads):
  1. Verify kubelet is running with certificate rotation enabled:
Confirm the output either:
  • Shows --rotate-certificates=true and does not contain --rotate-certificates=false, or
  • Does not show any --rotate-certificates flag and you have rotateCertificates: true in /var/lib/kubelet/config.yaml.
kubectl cannot configure kubelet process flags or its config file on worker nodes, so it cannot be used to set rotate-certificates or edit /var/lib/kubelet/config.yaml or the systemd drop-ins. Make the changes directly on each worker node’s host configuration as described in the Manual Steps section.