Skip to main content

More Info:

This admission controller rejects all net-new usage of the Service field externalIPs

Risk Level

Low

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. On every control plane node, back up the existing manifest before editing:
  2. On every control plane node, open the API server static pod manifest for editing:
  3. In the spec.containers[0].command section, locate the --enable-admission-plugins flag. Remove DenyServiceExternalIPs from the comma-separated list (leave the rest of the plugins unchanged), then save and exit.
    Example before:
    Example after:
    Note: Saving this file will cause the kubelet to restart the kube-apiserver static pod.
  4. If DenyServiceExternalIPs is present as its own flag (older/custom configurations), remove that line entirely:
  5. Wait for the kube-apiserver pod to be recreated and become Ready (run on any machine with kubectl access):
  6. Verify on every control plane node that the kube-apiserver process is now running without DenyServiceExternalIPs:
kubectl cannot change the DenyServiceExternalIPs admission plugin because it is configured via the kube-apiserver static pod manifest on each control plane node (/etc/kubernetes/manifests/kube-apiserver.yaml). To remediate this finding, make the change directly on the host as described in the Manual Steps section.

Additional Reading: