Skip to main content

More Info:

The kubelet —client-ca-file should point to a client CA file so that certificate-based client authentication is enforced. Without it, clients cannot be verified via x509 certificates.

Risk Level

High

Address

Security

Compliance Standards

  • CIS AKS

Triage and Remediation

Remediation

Manual Steps

  1. On every worker node, confirm the kubelet is running and note how it is started:
    If you see --config=/var/lib/kubelet/config.yaml (or similar), it is using a config file. If you see --client-ca-file directly in the command, it is using command line arguments via systemd.
  2. If using a kubelet config file on this worker node, edit it to set the client CA file (adjust the path only if your CA is elsewhere):
    Ensure the following block exists and is populated (create sections if missing):
    Save and exit.
  3. If using command line arguments on this worker node, edit the kubelet systemd drop-in to add the --client-ca-file flag:
    In the Environment= line that defines KUBELET_AUTHZ_ARGS, ensure it contains:
    Preserve any other existing options; just add --client-ca-file=/etc/kubernetes/certs/ca.crt if it is missing. Save and exit.
  4. Reload systemd configuration and restart the kubelet on this worker node (this will temporarily disrupt workloads scheduled here):
  5. Verify on this worker node that the kubelet process now includes the correct --client-ca-file (or that the config file is in use and contains the setting):
    Confirm either:
    • The command line shows --client-ca-file=/etc/kubernetes/certs/ca.crt, or
    • The command line shows --config=/var/lib/kubelet/config.yaml and the file contains:
      with clientCAFile: "/etc/kubernetes/certs/ca.crt" present.
kubectl cannot configure kubelet process flags or host-level files, so it cannot be used to set --client-ca-file or edit /etc/kubernetes/certs/ca.crt. This must be fixed directly on each worker node’s OS (systemd unit and/or kubelet config file); see the Manual Steps section for exact remediation commands.