Skip to main content

More Info:

Disable anonymous requests to the Kubelet server.

Risk Level

High

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 static pod manifest for editing:
  3. In the kube-apiserver container command or args section, ensure the flag is present and set to false (add it if missing), for example:
    Save and exit. Editing this file will cause the kubelet to restart the API server pod automatically.
  4. Wait for the kube-apiserver pod to be recreated and become Ready (from any machine with kubectl access):
  5. On every control plane node, verify the running kube-apiserver process now includes --anonymous-auth=false:
kubectl cannot modify kube-apiserver process flags or host-level files, so it cannot be used to set --anonymous-auth=false. To remediate this finding, you must edit the static pod manifest /etc/kubernetes/manifests/kube-apiserver.yaml directly on every control plane node; see the Manual Steps section for the exact procedure.

Additional Reading: