Skip to main content

More Info:

Verifies that the NodeRestriction admission plugin is enabled so kubelets can only modify their own node and pod objects, limiting a compromised nodes reach.

Risk Level

High

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. On every control plane node, back up the API server static pod manifest:
  1. On every control plane node, open the manifest for editing:
  1. In the container command section, locate the --enable-admission-plugins argument.
    • If it exists, ensure NodeRestriction is listed (comma‑separated), for example:
  • If it does not exist, add a new line in the command list, e.g.:
  1. Save the file and exit the editor. The kubelet will automatically restart the kube-apiserver static pod because the manifest under /etc/kubernetes/manifests changed, which will briefly restart the API server on that node.
  2. Wait for the API server pod to come back to Running on the control plane node (you can monitor with):
  1. Verify on every control plane node that the kube-apiserver process includes NodeRestriction in --enable-admission-plugins:
kubectl cannot configure API server admission plugins or edit the static pod manifest at /etc/kubernetes/manifests/kube-apiserver.yaml on control plane nodes. To enable the NodeRestriction admission plugin and remediate this finding, follow the guidance in the Manual Steps section on each control plane node.
UsageRun this script on every control plane node as a user with permission to modify /etc/kubernetes/manifests/kube-apiserver.yaml: