CertGrid CertGrid
Hands-on Lab·Certified Kubernetes Security Specialist

Pod Security Admission: enforce, audit and warn

Every namespace you create admits a privileged container and says nothing about it. This guide turns that off in the order a real rollout needs - find out what breaks, record it, then refuse it - and shows the one thing labelling a namespace will never do.

Microservice Vulnerabilities Guide 18 of 40 Intermediate

Written against the versions above. Pod Security Admission is built into the apiserver and is configured entirely with namespace labels. There is no controller to install and nothing to keep running.

The cka6001 cluster: one control plane and 2 schedulable workers, on Cilium.
Server NameIP AddressOSRolesCPURAMHDD
CKA6001192.168.0.46Ubuntu 26.04 LTSControl Plane Node (tainted NoSchedule)2 Core4 GB50 GB
CKA6001-NODE01192.168.0.47Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA6001-NODE02192.168.0.48Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB

Before you start

  1. A namespace with no level set

  2. Warn and audit before you enforce

  3. Enforce, and read the refusal

  4. The level below, and what it does not cover

Official sources