More Info:
Do not disable the secure port.Risk Level
CriticalAddress
SecurityCompliance Standards
- CIS Kubernetes
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
- On every control plane node, back up the current manifest before editing:
- On every control plane node, edit the API server manifest to remove or change the
--secure-portflag. For example, to set it to 6443:
--secure-port=0 line or change 0 to your desired non‑zero port.-
Wait for the kubelet on each control plane node to automatically restart the
kube-apiserverstatic pod due to the manifest change (typically within ~1 minute). Be aware this restarts the API server and may briefly impact API availability. -
On any machine with SSH access to each control plane node, verify the new
kube-apiserverprocess is running with a non‑zero secure port:
--secure-port=0 argument in the output; if --secure-port appears, it must be set to a non‑zero port (for example --secure-port=6443).Using kubectl
Using kubectl
kubectl cannot modify the kube-apiserver static pod manifest or its process flags. This finding must be fixed directly on every control plane node by editing
/etc/kubernetes/manifests/kube-apiserver.yaml; see the Manual Steps section for the exact procedure.Automation
Automation

