More Info:
Verifies that —tls-cert-file and —tls-private-key-file are set so the API server serves connections over TLS rather than plaintext HTTP.Risk Level
HighAddress
SecurityCompliance Standards
- CIS Kubernetes
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
On every control plane node, confirm where the API server static pod manifest is located and back it up:
-
On the same control plane node, ensure you have or create a TLS certificate and key for the API server (adjust CN/SANs as appropriate for your cluster):
-
On every control plane node, edit the API server manifest to reference the TLS cert and key (this will cause the kube-apiserver static pod to restart when you save):
If the
- kube-apiserverline does not exist exactly as matched above, instead open the file in an editor and add these two flags undercommand:orargs:: -
On every control plane node, ensure the certificate and key are mounted into the kube-apiserver container if not already (edit with an editor if needed):
Add underspec.containers[0].volumeMountsin/etc/kubernetes/manifests/kube-apiserver.yaml:And ensure a matching volume exists underspec.volumes:Saving the file will restart the kube-apiserver static pod. -
Wait for the kube-apiserver pod to restart and become Running on each control plane node:
-
Verify on every control plane node that the kube-apiserver process is now using the TLS certificate and key flags:
Using kubectl
Using kubectl
kubectl cannot modify the kube-apiserver static pod manifest or its process flags; this setting must be changed directly in
/etc/kubernetes/manifests/kube-apiserver.yaml on every control plane node. Refer to the Manual Steps section for the exact edits and verification commands to remediate this finding.Automation
Automation

