What problem does it solve?
Hardening Kubernetes workloads against privilege escalation and container breakout requires correctly applying Pod Security Standards, but misconfigured namespace labels, silent label typos, and premature enforcement commonly leave clusters either unprotected or broken. This Skill provides a verified, phased workflow for enforcing Privileged, Baseline, and Restricted profiles via the built-in Pod Security Admission controller.
Core Features & Use Cases
- Namespace-Level PSA Enforcement: Apply enforce, audit, and warn labels with pinned versions to route workloads into Privileged, Baseline, or Restricted profiles.
- Restricted-Compliant Pod Specs: Generate hardened Deployment manifests with runAsNonRoot, seccomp, dropped capabilities, and read-only root filesystems.
- Phased Migration & Dry-Run Verification: Move from audit-only discovery to full enforcement using kubectl dry-run commands that list existing violators before blocking them.
- Use Case: A platform engineer migrating off deprecated PodSecurityPolicy labels the production namespace with audit/warn restricted, reviews violations, fixes non-compliant deployments, then flips enforce=restricted after confirming a test pod is rejected.
Quick Start
Ask the AI to apply restricted Pod Security Standards enforcement to the production namespace and verify it rejects a privileged test pod.