More Info:
Privileged containers can access host devices and escape isolation. Enforce Pod Security Admission policies in each namespace with user workloads to restrict privileged container admission.Risk Level
CriticalAddress
SecurityCompliance Standards
- CIS OKE
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
List all namespaces and identify user-workload namespaces
- Run on: any machine with kubectl access
- From the output, determine which namespaces contain user workloads (excluding system/control namespaces such as
kube-system,kube-public,kube-node-lease,kube-admin, and any provider-specific system namespaces).
-
Review existing Pod Security Admission labels on user-workload namespaces
- Run on: any machine with kubectl access
- For each user namespace, check whether
pod-security.kubernetes.io/enforceis present and whether its value is at leastrestrictedfor namespaces where privileged workloads must not be allowed.
-
Identify current privileged pod usage and decide on required policy level
- Run on: any machine with kubectl access
- For each user namespace, decide if privileged containers are truly required. If privileged pods are in use and needed, you may need to keep a less strict policy (e.g.,
baselineor no enforce label yet) or redesign those workloads. If they are not required, plan to enforcerestricted.
-
Apply or adjust Pod Security Admission labels per namespace
- Run on: any machine with kubectl access
- For namespaces where privileged containers must be prevented:
- Optionally, to introduce a gentler rollout by warning before enforcing, you can use:
-
Optionally set default warnings cluster-wide, then tighten per-namespace
- Run on: any machine with kubectl access
- Then override critical user namespaces individually with
pod-security.kubernetes.io/enforce=restrictedas in step 4, once you are confident workloads comply.
-
Verify namespaces are correctly labeled and privileged pods are blocked
- Run on: any machine with kubectl access
- In a namespace where you set
pod-security.kubernetes.io/enforce=restricted, attempt to create a privileged pod and confirm it is rejected:
- Ensure the API server denies this pod, confirming privileged containers are minimized in that namespace.
Using kubectl
Using kubectl
ENFORCEis empty (<none>) for namespaces that host user workloads.ENFORCEis set toprivilegedin any user-workload namespace.- There is no
WARN/AUDITconfiguration where you expect at least visibility of violations.
Identify user workload namespaces (exclude system/control-plane):
- Any namespace returned here that, when checked in step 1, has no
pod-security.kubernetes.io/enforcelabel, or has it set toprivileged, needs review.
Drill into a single namespace’s PSA config:
- Missing
pod-security.kubernetes.io/enforcelabel, or value not aligned with your policy (e.g., notrestrictedfor sensitive/user-facing workloads). - Conflicting or unexpected combinations of
enforce,warn, andauditlabels.
Review currently admitted privileged workloads:
- Any line in the output shows a privileged container. For those namespaces:
- Check whether PSA
enforceis absent or too permissive (from steps 1–3). - Decide if those privileged pods are truly justified; if not, the namespace’s PSA policy is likely too weak.
- Check whether PSA
Automation
Automation

