More Info:
Anonymous authentication allows unauthenticated requests to reach the kubelet API. Setting —anonymous-auth to false ensures every request must be authenticated.Risk Level
CriticalAddress
SecurityCompliance Standards
- CIS Kubernetes
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
On every control plane node, confirm the current kube-apiserver arguments:
-
On every control plane node, back up the existing manifest:
-
Edit the kube-apiserver static pod manifest to set anonymous auth to false:
In the
containers:→- name: kube-apiserver→command:list, ensure there is a line exactly like:If a--anonymous-auth=flag already exists with a different value, change it tofalse. Save and exit.
Note: updating this file will cause the kube-apiserver static pod to restart automatically. -
(If flags are passed via
args:instead ofcommand:) ensure the flag is present or corrected underargs:: -
Wait for the kube-apiserver pod to restart and become Ready (from any machine with kubectl access):
-
Verify on every control plane node that the process now includes
--anonymous-auth=false:
Using kubectl
Using kubectl
kubectl cannot modify kube-apiserver process flags or static pod manifests, so it cannot be used to set
--anonymous-auth=false for this control-plane component. To address this finding, you must edit /etc/kubernetes/manifests/kube-apiserver.yaml directly on every control plane node; follow the steps in the Manual Steps section.Automation
Automation

