More Info:
Verifies that —service-account-extend-token-expiration is set to false so bound service account tokens are not automatically extended to long lifetimes, reducing token exposure.Risk Level
HighAddress
SecurityCompliance Standards
- CIS Kubernetes
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
On every control plane node, back up the existing manifest before editing:
-
On every control plane node, open the kube-apiserver static pod manifest for editing:
-
In the container
command:section, either add or modify the flag so it is present exactly as:Ensure there is no other--service-account-extend-token-expirationflag with a different value in the file, then save and exit.
Note: editing this file will cause the kube-apiserver static pod to be restarted automatically by the kubelet. -
Wait 30–60 seconds for the kube-apiserver pod to restart, then confirm the apiserver container is running (on any control plane node):
(If
crictlis not available, usesudo docker ps | grep kube-apiserveron nodes using Docker.) -
On every control plane node, verify the running process includes the correct flag value:
Ensure this command returns at least one line and that there is no line showing
--service-account-extend-token-expiration=true.
Using kubectl
Using kubectl
kubectl cannot modify the kube-apiserver static pod manifest or its process flags, so this setting cannot be fixed via the Kubernetes API. To remediate, you must edit
/etc/kubernetes/manifests/kube-apiserver.yaml directly on every control plane node; follow the Manual Steps section for the exact host-level changes.Automation
Automation

