Skip to main content

More Info:

Ensure that the API server pod specification file ownership is set to root:root

Risk Level

Low

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. On every control plane node, check the current ownership of the API server manifest:
  2. On every control plane node, set the file owner and group to root:
  3. On every control plane node, confirm the permissions and basic file info (optional sanity check):
  4. On every control plane node, verify the fix using the audit-style command:
    The output must be:
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.
Usage:
  • Run this script on every control plane node (e.g., via SSH, Ansible script module, or similar).
  • It is safe to re-run; it only changes ownership when needed.

Additional Reading: