More Info:
Setup TLS connection on the API server.Risk Level
LowAddress
SecurityCompliance Standards
- CIS Kubernetes
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
On every control plane node, confirm the current kube-apiserver options and identify whether
--client-ca-fileis present and what it is set to:If--client-ca-fileis missing or incorrect, proceed. -
On the same control plane node, ensure you have (or create) a valid client CA file that will sign client certificates used to authenticate to the API server, for example:
If you need a dedicated client CA, place it in a secure path such as
/etc/kubernetes/pki/client-ca.crtand ensure it is readable by the kube-apiserver process: -
Edit the kube-apiserver static pod manifest on the control plane node:
In the
spec.containers[0].commandlist, add or correct the flag so it points to your chosen client CA file, for example:Save and exit. Editing this file will automatically restart the kube-apiserver static pod. -
Still on the control plane node, ensure the path in
--client-ca-filematches an existing file and that the directory is not writable by non-privileged users: -
Wait for the kube-apiserver static pod to restart and become Ready:
-
Verification (on every control plane node): confirm the running kube-apiserver process includes the correct
--client-ca-fileargument and path:Ensure the printed value matches the intended client CA file path.
Using kubectl
Using kubectl
kubectl cannot modify the kube-apiserver static pod manifest or its process flags, including
--client-ca-file, because these are defined in /etc/kubernetes/manifests/kube-apiserver.yaml on each control plane node. To remediate this finding, make the changes directly on the node as described in the Manual Steps section.Automation
Automation

