More Info:
Reject creating objects in a namespace that is undergoing termination.Risk Level
LowAddress
SecurityCompliance Standards
- CIS Kubernetes
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
On every control plane node, back up the kube-apiserver manifest:
-
On every control plane node, open the manifest for editing:
-
In the
command:section of the kube-apiserver container, locate the line starting with- --disable-admission-plugins=.- If it does not exist, go to step 4.
- If it exists and contains
NamespaceLifecycle, remove onlyNamespaceLifecyclefrom the comma-separated list, keeping any other plugins as-is.
Example before:
Example after: -
If there is no
--disable-admission-pluginsline, add nothing for this control; no additional flag is required as long asNamespaceLifecycleis not disabled. Save and exit the editor.
Note: Editing this static pod manifest will cause the kubelet to automatically restart the kube-apiserver pod. -
Wait 1–2 minutes for the kube-apiserver pod to be recreated, then on every control plane node verify that
NamespaceLifecycleis not listed under--disable-admission-plugins:Confirm that the printed value (if any) does not containNamespaceLifecycle.
Using kubectl
Using kubectl
kubectl cannot modify kube-apiserver process flags or the static pod manifest at
/etc/kubernetes/manifests/kube-apiserver.yaml on control plane nodes, so this finding cannot be fixed via the Kubernetes API. To remediate, make the changes directly on each control plane node as described in the Manual Steps section.Automation
Automation

