More Info:
Validate service account before validating token.Risk Level
HighAddress
SecurityCompliance Standards
- CIS Kubernetes
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
- On every control plane node, open the kube-apiserver static pod manifest for editing (this will cause the API server pod to restart when saved):
- In the
spec.containers[0].commandlist, either add or update the argument to explicitly enable service account lookup, ensuring there is only one such flag and it is set to true, for example:
-
If you prefer to rely on the default behavior instead of setting it explicitly, remove any existing
--service-account-lookup=entry from thecommandlist and leave it absent (do not add a replacement). -
Save the file and exit the editor; the kubelet will detect the manifest change and automatically restart the
kube-apiserverstatic pod. Allow a few moments for it to restart. - On the same control plane node, verify the API server process now has the correct argument set (or the flag removed if you chose to rely on the default):
- In the output, confirm that either:
--service-account-lookup=trueis present and there is no--service-account-lookup=false, or- there is no
--service-account-lookup=argument at all (indicating the default applies).
Using kubectl
Using kubectl
kubectl cannot modify the kube-apiserver static pod manifest or its process flags. To remediate this finding, you must edit
/etc/kubernetes/manifests/kube-apiserver.yaml directly on every control plane node; see the Manual Steps section for exact host-level instructions.Automation
Automation

