More Info:
Verify kubelets certificate before establishing connection.Risk Level
MediumAddress
SecurityCompliance Standards
- CIS Kubernetes
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
- On every control plane node, identify the kube-apiserver static pod manifest and back it up:
- Identify the correct CA file that signs kubelet serving certificates (commonly under
/etc/kubernetes/pki/):
/etc/kubernetes/pki/ca.crt with the appropriate kubelet CA file if different in your environment.)- Edit the API server manifest to set
--kubelet-certificate-authorityto that CA file (this will restart the kube-apiserver because it is a static pod):
spec.containers[0].command, either add or update the argument so that there is a line like:- Ensure the CA file is mounted into the kube-apiserver container if it is not already. In the same file, under
spec.volumes, confirm or add:
spec.containers[0].volumeMounts, confirm or add:- Save the file and exit the editor. The kubelet will detect the manifest change and restart the kube-apiserver. Check that the static pod is running again:
- Verify that the kube-apiserver is now running with the correct
--kubelet-certificate-authorityargument:
Using kubectl
Using kubectl
kubectl cannot modify the kube-apiserver static pod manifest or its process flags, so this finding cannot be fixed via the Kubernetes API. To remediate it, you must edit
/etc/kubernetes/manifests/kube-apiserver.yaml directly on every control plane node; see the Manual Steps section for the exact host-level procedure.Automation
Automation

