Skip to main content

More Info:

Verifies that the kube-controller-manager pod manifest file is owned by root:root so only privileged users can modify it.

Risk Level

Medium

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. On every control plane node, check the current ownership of the manifest file:
  2. If the owner or group is not root:root, change the ownership on that control plane node:
  3. (Optional) Confirm file still exists and note that editing a static pod manifest under /etc/kubernetes/manifests will trigger an automatic restart of the kube-controller-manager pod by the kubelet; no manual restart is needed.
  4. Verify the fix on that control plane node:
    The output must be:
kubectl cannot modify file ownership on control plane nodes, so it cannot be used to fix this finding on /etc/kubernetes/manifests/kube-controller-manager.yaml. To remediate, you must change ownership directly on every control plane node’s filesystem; see the Manual Steps section for exact commands.
Usage:
  • Run this script on every control plane node (e.g., via SSH or your configuration management/automation system).