Skip to main content

More Info:

Verifies that —service-account-lookup is set to true so service account tokens are validated against etcd, ensuring deleted tokens are rejected.

Risk Level

High

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. On every control plane node, open the API server static pod manifest for editing:
  2. In the command: or args: list for kube-apiserver, either:
    • Add the flag if missing:
    • Or, if a line like this exists, change it to true:
    • Alternatively, you may delete the entire - --service-account-lookup=... line to rely on the secure default.
  3. Save the file and exit the editor. The kubelet will automatically detect the manifest change and restart the kube-apiserver static pod on that control plane node.
  4. Wait 30–60 seconds for the API server pod to restart, then verify the process on that node includes the correct flag (or that the flag is absent, using the default):
  5. In the output, confirm either:
    • --service-account-lookup=true is present in the command line, or
    • there is no --service-account-lookup= flag at all.
kubectl cannot modify the API server’s static pod manifest or its process flags. This setting must be changed directly on each control plane node in /etc/kubernetes/manifests/kube-apiserver.yaml; see the Manual Steps section for the required host-level changes.