Ensure that the admission control plugin NamespaceLifecycle is set

MEDIUM

Description

Description:

Reject creating objects in a namespace that is undergoing termination.

Rationale:

Setting admission control policy to 'NamespaceLifecycle' ensures that objects cannot be created in non-existent namespaces, and that namespaces undergoing termination are not used for creating the new objects. This is recommended to enforce the integrity of the namespace termination process and also for the availability of the newer objects.

Remediation

Edit the API server pod specification file '/etc/kubernetes/manifests/kube-apiserver.yaml' on the master node and set the '--disable-admission-plugins' parameter to ensure it does not include 'NamespaceLifecycle'.

Policy Details

Rule Reference ID: AC_K8S_0024
Remediation Available: No
Resource: kubernetes_pod
Resource Category: Compute
Resource Type: Pod

Frameworks