Skip to main content

More Info:

The kubelet —authorization-mode must not be AlwaysAllow, which would authorize every request. Use Webhook so requests are properly authorized.

Risk Level

Critical

Address

Security

Compliance Standards

  • CIS AKS

Triage and Remediation

Remediation

Manual Steps

  1. On every worker node, back up the existing kubelet config file:
  1. On every worker node, edit /var/lib/kubelet/config.yaml and set the authorization mode to Webhook (create the block if it does not exist). For example:
(If your file already has an authorization: block, instead open it in an editor and change only the mode: line to mode: Webhook.)
  1. If the worker node also sets kubelet flags via systemd, ensure --authorization-mode is not set to AlwaysAllow. On each worker node:
If you need to explicitly set Webhook via flags, append:
  1. On every worker node, reload systemd and restart kubelet (this restarts the kubelet process and may briefly impact node readiness):
  1. On every worker node, verify kubelet is no longer using AlwaysAllow:
Confirm the kubelet command line does not contain --authorization-mode=AlwaysAllow and, if present, uses --authorization-mode=Webhook.
kubectl cannot modify kubelet host-level configuration such as /var/lib/kubelet/config.yaml or systemd units on worker nodes. Make the change directly on each worker node as described in the Manual Steps section.