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
HighAddress
SecurityCompliance Standards
- CIS AKS
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
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-filedirectly in the command, it is using command line arguments via systemd. -
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.
-
If using command line arguments on this worker node, edit the kubelet systemd drop-in to add the
--client-ca-fileflag:In theEnvironment=line that definesKUBELET_AUTHZ_ARGS, ensure it contains:Preserve any other existing options; just add--client-ca-file=/etc/kubernetes/certs/ca.crtif it is missing. Save and exit. -
Reload systemd configuration and restart the kubelet on this worker node (this will temporarily disrupt workloads scheduled here):
-
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.yamland the file contains:withclientCAFile: "/etc/kubernetes/certs/ca.crt"present.
- The command line shows
Using kubectl
Using kubectl
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.Automation
Automation

