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
HighAddress
SecurityCompliance Standards
- CIS Kubernetes
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
- On every control plane node, back up the API server static pod manifest:
- On every control plane node, open the manifest for editing:
- In the container command section, locate the
--enable-admission-pluginsargument.- If it exists, ensure
NodeRestrictionis listed (comma‑separated), for example:
- If it exists, ensure
- If it does not exist, add a new line in the command list, e.g.:
-
Save the file and exit the editor. The kubelet will automatically restart the
kube-apiserverstatic pod because the manifest under/etc/kubernetes/manifestschanged, which will briefly restart the API server on that node. - Wait for the API server pod to come back to Running on the control plane node (you can monitor with):
- Verify on every control plane node that the
kube-apiserverprocess includesNodeRestrictionin--enable-admission-plugins:
Using kubectl
Using kubectl
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.Automation
Automation
/etc/kubernetes/manifests/kube-apiserver.yaml:
