Skip to main content

More Info:

Anonymous authentication should be disabled on the kubelet so that unauthenticated requests are rejected. Enabling it allows anonymous, unauthenticated access to the kubelet API.

Risk Level

Critical

Address

Security

Compliance Standards

  • CIS AKS

Triage and Remediation

Remediation

Manual Steps

  1. On every worker node, open the kubelet config file and ensure anonymous auth is disabled:
Find (or add if missing) the following section and set it exactly like this:
Save and exit.
  1. If the kubelet is also configured via systemd flags, ensure no conflicting --anonymous-auth flag is present:
If you see a kubelet unit drop-in with --anonymous-auth=true, edit it:
In the line that defines kubelet arguments, set or add:
Save and exit.
  1. Reload systemd and restart kubelet on that worker node:
  1. Verify the kubelet process is running with anonymous auth disabled on that worker node:
Check the output for either --anonymous-auth=false or confirm there is no --anonymous-auth=true flag and anonymous auth is disabled via /var/lib/kubelet/config.yaml as edited in step 1.
kubectl cannot change kubelet process flags or its config file, so this finding cannot be remediated via the Kubernetes API. The fix must be applied directly on each worker node’s host configuration (for example /var/lib/kubelet/config.yaml and the kubelet systemd unit); see the Manual Steps section for details.