Skip to main content

More Info:

Verifies that the DenyServiceExternalIPs admission plugin is enabled. This plugin blocks use of Service external IPs, mitigating a known man-in-the-middle vector.

Risk Level

Medium

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. On every control plane node, back up the API server manifest before editing:
  2. On every control plane node, open the API server manifest for editing:
  3. In the spec.containers[0].command section, locate any existing --disable-admission-plugins= flag.
    • Remove ServiceAccount from its comma-separated list if present, ensuring it is not listed.
    • If the flag becomes empty, remove the flag line entirely.
    • Save and exit the editor.
      (Editing this static pod manifest will cause the kube-apiserver pod to restart automatically.)
  4. On every control plane node, confirm that the kube-apiserver pod has restarted and is running:
    (Use docker ps instead if Docker is the container runtime.)
  5. On any machine with access to the node, verify the running kube-apiserver process no longer disables ServiceAccount via --disable-admission-plugins:
    Inspect the command line output and confirm that either --disable-admission-plugins is absent, or if present, its value does not contain ServiceAccount.
kubectl cannot modify kube-apiserver process flags or the static pod manifest at /etc/kubernetes/manifests/kube-apiserver.yaml on control plane nodes, so this finding cannot be fixed via the Kubernetes API. Make the required changes directly on each control plane node’s host configuration as described in the Manual Steps section.