More Info:
Disable anonymous requests to the Kubelet server.Risk Level
HighAddress
SecurityCompliance Standards
- CIS Kubernetes
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
On every control plane node, back up the API server manifest before editing:
-
On every control plane node, open the API server static pod manifest for editing:
-
In the
kube-apiservercontainercommandorargssection, 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. -
Wait for the kube-apiserver pod to be recreated and become Ready (from any machine with kubectl access):
-
On every control plane node, verify the running kube-apiserver process now includes
--anonymous-auth=false:
Using kubectl
Using kubectl
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.Automation
Automation

