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
HighAddress
SecurityCompliance Standards
- CIS EKS
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
- On every worker node, back up the kubelet configuration and systemd drop-in files:
- Edit
/var/lib/kubelet/config.yamlto enable certificate rotation (YAML key name is case-sensitive to your deployment; ifrotateCertificatesexists, set it to true, otherwise add it under the top-levelkubeletConfigurationblock):
- Edit the kubelet systemd drop-in to ensure no flag disables rotation:
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=trueis present, for example:
- Reload systemd and restart kubelet (this restarts kubelet and may briefly impact node status/workloads):
- Verify kubelet is running with certificate rotation enabled:
- Shows
--rotate-certificates=trueand does not contain--rotate-certificates=false, or - Does not show any
--rotate-certificatesflag and you haverotateCertificates: truein/var/lib/kubelet/config.yaml.
Using kubectl
Using kubectl
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.Automation
Automation

