More Info:
Ensure that the API server pod specification file ownership is set to root:rootRisk Level
LowAddress
SecurityCompliance Standards
- CIS Kubernetes
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
On every control plane node, check the current ownership of the API server manifest:
-
On every control plane node, set the file owner and group to root:
-
On every control plane node, confirm the permissions and basic file info (optional sanity check):
-
On every control plane node, verify the fix using the audit-style command:
The output must be:
Using kubectl
Using kubectl
kubectl cannot modify file ownership on the control-plane node filesystem, including
/etc/kubernetes/manifests/kube-apiserver.yaml. This change must be made directly on every control plane node via host-level commands; see the Manual Steps section for the exact commands to run and how to verify the fix.Automation
Automation
- Run this script on every control plane node (e.g., via SSH, Ansible
scriptmodule, or similar). - It is safe to re-run; it only changes ownership when needed.

