Skip to main content

More Info:

Anonymous authentication allows unauthenticated requests to the kubelet API. Disabling it ensures every request is authenticated, preventing anonymous access to node and workload data.

Risk Level

Critical

Address

Security

Compliance Standards

  • CIS EKS

Triage and Remediation

Remediation

Manual Steps

  1. On every worker node, SSH in and confirm how kubelet is configured and where its config file is:
    If you see a --config= argument, note the full path (for example, /var/lib/kubelet/config.yaml or /etc/kubernetes/kubelet.conf). If there is no --config argument, you will use the systemd unit/args file instead.
  2. If kubelet uses a config file (Method 1), edit it to disable anonymous auth (example uses /var/lib/kubelet/config.yaml; replace with the actual path you found):
    Under the authentication: section, ensure it contains:
    If the authentication or anonymous sections are missing, add them as above, respecting YAML indentation.
  3. If kubelet instead uses executable arguments (Method 2), edit the systemd drop‑in on each worker node (EKS-optimized and similar systems):
    In the line defining kubelet arguments (often KUBELET_ARGS= or inside ExecStart=), ensure --anonymous-auth=false is present. For example:
    or in ExecStart=:
  4. On every worker node, reload systemd configuration and restart kubelet (this restarts the kubelet and may briefly impact node status/workload reporting):
  5. Verify on every worker node that the kubelet is running and the change is active:
    Inspect the output:
    • If using args, confirm --anonymous-auth=false appears.
    • If using a config file, confirm the --config= argument points to the file you edited.
kubectl cannot change kubelet process flags or its on-node configuration file at /var/lib/kubelet/config.yaml, so this finding cannot be remediated via the Kubernetes API. Apply the fix directly on every worker node’s host OS as described in the Manual Steps section.