Course contentsShow
← Cloud and Infrastructure
Lesson 1398 of 2,98928. Kubernetes SecurityFree lesson

Pod Security Standards

Learn the three built-in security profiles: Privileged, Baseline, and Restricted, and their enforcement levels.

Pod Security Standards

What you'll learn: How Kubernetes classifies pod security into three built-in profiles with different enforcement levels.


What Are Pod Security Standards?

Pod Security Standards (PSS) are a set of predefined security policies that define what security settings pods must meet. Think of them as security presets for your cluster—like choosing "Low," "Medium," or "High" security when setting up a home alarm system.

Rather than writing custom policies from scratch for every security context setting you've learned (runAsNonRoot, capabilities, seccomp, etc.), Kubernetes bundles common security configurations into three standardized profiles.

The Three Security Profiles

Privileged

The most permissive profile. Allows almost anything, including privileged containers, host namespaces, and unrestricted capabilities. Use this only when you absolutely need maximum host access (like kube-proxy or CNI pods).

Baseline

A minimally restrictive profile that prevents known privilege escalations. It blocks the most dangerous settings like privileged containers and hostPath volumes, but allows default (restricted) capabilities and running as root. This is a good starting point for most workloads.

Restricted

The most restrictive profile, enforcing current pod hardening best practices. Requires running as non-root, drops all capabilities, and enforces read-only root filesystems. Use this for security-sensitive applications.

Enforcement Levels

Each profile can be applied with three enforcement modes:

  • enforce: Rejects pods that violate the policy
  • audit: Allows pods but logs violations
  • warn: Allows pods but returns warnings to users

You can apply different modes simultaneously (e.g., enforce Baseline while warning about Restricted violations).

Key Takeaway: Pod Security Standards provide three ready-made security profiles (Privileged, Baseline, Restricted) that bundle your security context settings into enforceable policies at different strictness levels.