Skip to main content

More Info:

Ensure that the API server pod specification file has permissions of 644 or more restrictive.

Risk Level

Medium

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. On every control plane node, check the current permissions of the API server pod specification file:
  2. If the reported permissions are more permissive than 644 (for example, 664, 666, 744, 755, 777), restrict them with:
  3. (Optional) Confirm file ownership is appropriate (typically root:root) and adjust if needed:
  4. Be aware: editing this static pod manifest may trigger a restart of the kube-apiserver container on that control plane node as the kubelet re-reads the manifest directory.
  5. Re-verify on every control plane node that the permissions are now compliant:
    The output should show:
kubectl cannot change file permissions on control plane nodes, so this finding cannot be fixed via the Kubernetes API. The permissions must be updated directly on each control plane node’s filesystem (for example, with chmod on /etc/kubernetes/manifests/kube-apiserver.yaml); see the Manual Steps section for how to do this.

Additional Reading: