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
HighAddress
SecurityCompliance Standards
- CIS EKS
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
On every worker node, check how kubelet is configured:
Review the command line for any
--configflag (config file) and any--rotate-kubelet-server-certificateflag (exec arg override). -
If using a kubelet config file (recommended), edit it and enable the feature gate (example path from finding):
If
featureGatesis not present, add this block under the top-level YAML:
--rotate-kubelet-server-certificate=false in /etc/systemd/system/kubelet.service.d/10-kubelet-args.conf, edit it:- If you are configuring kubelet only with executable arguments (no config file referenced in the
psoutput), append the flag in the systemd drop-in (create or edit as needed):
- Verify kubelet is running with the correct setting on the worker node:
Confirm either that
--rotate-kubelet-server-certificate=trueappears in the command line, or that no--rotate-kubelet-server-certificate=falseflag is present and the config file hasRotateKubeletServerCertificate: true.
Using kubectl
Using kubectl
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.Automation
Automation

