More Info:
Privileged containers run with elevated host capabilities and can compromise the underlying node. Use Pod Security Admission policies to restrict their admission.Risk Level
CriticalAddress
SecurityCompliance Standards
- CIS EKS
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
Identify namespaces with user workloads
Run on: any machine with kubectl accessDecide which namespaces are user / application namespaces (exclude system namespaces like kube-system, kube-public, kube-node-lease, etc., unless you explicitly want PSA there). -
Enforce
restrictedPod Security Admission on each user namespace
Run on: any machine with kubectl access
For each chosen namespace, run (replaceMY-NAMESPACEwith the actual name):This blocks creation of pods that request privileged containers in that namespace. -
Optionally add warning-only policy cluster‑wide
Run on: any machine with kubectl access
This does not block pods, but surfaces warnings where they violate baseline: -
Handle existing privileged pods (if any) by policy decision
Run on: any machine with kubectl access
List privileged pods:For each listed pod:- Decide if it is truly required; if not, delete it:
- If required, plan a safer replacement (e.g., remove
privileged: trueand use more granular capabilities) and update the Deployment/DaemonSet/StatefulSet manifest that owns it.
- Decide if it is truly required; if not, delete it:
-
Recreate workloads with compliant securityContext
Run on: any machine with kubectl access
For each owning controller (Deployment/DaemonSet/StatefulSet, etc.) that used privileged containers, edit its manifest to removeprivileged: true, then apply:The controller will recreate pods that comply with therestrictedpolicy. -
Verification
Run on: any machine with kubectl accessConfirm the output is:
Using kubectl
Using kubectl
Automation
Automation

