Skip to main content

More Info:

Verifies that the ServiceAccount admission plugin is not disabled so automated service account tokens are managed and enforced for pods.

Risk Level

High

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. On every control plane node, back up the current API server manifest (run as root):
  2. On every control plane node, open the API server manifest for editing:
  3. In the spec.containers[0].command list, locate any --disable-admission-plugins= entry.
    • If it exists and contains ServiceAccount, remove ServiceAccount from the comma-separated list (leave the other plugins unchanged).
    • If the list becomes empty after removal, delete the entire --disable-admission-plugins=... argument line.
      Save and exit the editor.
      (Changing this file will automatically restart the kube-apiserver static pod on that node.)
  4. Wait for the kube-apiserver pod to restart and become Running on the control plane node:
    Ensure the most recent kube-apiserver container is in a Running state.
  5. From any control plane node, verify that the ServiceAccount admission plugin is not disabled:
    Confirm that:
    • Either no --disable-admission-plugins flag is present, or
    • The flag is present but its value does not include ServiceAccount.
kubectl cannot modify the kube-apiserver static pod manifest or its process flags. This finding must be remediated by editing /etc/kubernetes/manifests/kube-apiserver.yaml directly on every control plane node; see the Manual Steps section for the required host-level changes and verification.