Cloud & platform

Pod Security Standards

Three Kubernetes pod hardening profiles (Privileged, Baseline, Restricted) enforced per namespace by the built-in Pod Security Admission controller.

The Pod Security Standards define three cumulative profiles. Privileged is unrestricted. Baseline blocks known privilege escalations: host namespaces, privileged containers, hostPath volumes, added dangerous capabilities. Restricted additionally requires running as non-root, dropping all capabilities, allowPrivilegeEscalation: false and a seccomp profile.

They replaced PodSecurityPolicy, which was removed in Kubernetes 1.25. Pod Security Admission enforces them through namespace labels in three modes: enforce (reject), audit (annotate the audit log) and warn (return a warning to the client). Rolling out with warn and audit first shows what would break.

Limits: PSA is namespace-granular and cannot express exceptions per workload or check image provenance, so most clusters pair it with Gatekeeper or Kyverno. Investigators look for namespaces quietly relabelled to privileged, a classic step before running a host-mounting pod.

Namespace labelsyaml
apiVersion: v1
kind: Namespace
metadata:
  name: payments
  labels:
    pod-security.kubernetes.io/enforce: restricted
    pod-security.kubernetes.io/enforce-version: latest
    pod-security.kubernetes.io/warn: restricted
    pod-security.kubernetes.io/audit: restricted

Learn it properly

Also used in

Related terms