Pod Security Standards

Three built-in Kubernetes security profiles, called privileged, baseline and restricted, that define how locked down a pod must be.

In more detail

Privileged allows everything, baseline blocks known ways to gain extra privileges, and restricted enforces current hardening practice such as running as non-root, dropping all Linux capabilities and setting a seccomp profile. The built-in Pod Security admission controller applies them per namespace in enforce, audit or warn mode. They replaced the older PodSecurityPolicy feature, removed in Kubernetes 1.25.

Examples

kubectl label namespace payments pod-security.kubernetes.io/enforce=restricted
log-shipper violates restricted
  needs drop ALL capabilities
The baseline and restricted levels block hostPath volumes, privileged containers and host namespaces.

Related terms

Taught in

References

Certification courses