Check ID:
Provider: Kubernetes
Service:
Severity: HIGH
Categories:
Resource type:
apiserver_namespace_lifecycle_pluginProvider: Kubernetes
Service:
apiserverSeverity: HIGH
Categories:
cluster-securityResource type:
PodWhat this check verifies
Kubernetes API server has theNamespaceLifecycle admission controller active and not disabled, enforcing namespace lifecycle rules by rejecting objects targeting non-existent or terminating namespaces and protecting system namespaces from deletion.
Risk
WithoutNamespaceLifecycle, resources can be created in namespaces being removed or that never existed, causing inconsistent state and controller errors.
This degrades integrity and availability, leaving orphaned objects, delaying cleanup, and potentially preserving access via leftover service accounts or policies.
Recommendation
EnsureNamespaceLifecycle remains enabled to enforce namespace governance. Apply least privilege for namespace creation/deletion, and use separation of duties for approvals. Monitor deletions and remediate stuck finalizers so cleanup completes. Combine with RBAC and audit logs for defense in depth.
Remediation
Dashboard steps- SSH to the control plane node.
- Edit the API server manifest: /etc/kubernetes/manifests/kube-apiserver.yaml
- In spec.containers[0].command, ensure NamespaceLifecycle is enabled and not disabled:
- Save the file; the kubelet will restart the API server automatically.
- Verify the setting is present in the running pod spec:
References
Where this check fires
This check runs on every scheduled scan against your Kubernetes account. Findings appear at Cloud Security → Findings filterable byCheck ID = apiserver_namespace_lifecycle_plugin. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to Kubernetes checks