concept
Pod Security Standards and admission
The bookstore developer may have permission to create Pods, yet the cluster can reject a proposed configuration. Admission checks applicable API operations after authentication and authorization. A policy can prevent risky configurations before a container starts. It does not replace RBAC, network isolation or runtime verification.
Formal Syntax & Structure
kubernetes syntaxkubernetes
pod-security.kubernetes.io/enforce: restrictedWorking Example
Example Snippetkubernetes
apiVersion: v1kind: Namespacemetadata: name: book-security-lab labels: pod-security.kubernetes.io/enforce: baseline pod-security.kubernetes.io/enforce-version: v1.35 pod-security.kubernetes.io/warn: restricted pod-security.kubernetes.io/warn-version: v1.35 pod-security.kubernetes.io/audit: restricted pod-security.kubernetes.io/audit-version: v1.35 bytemind.example.invalid/policy-lab: 'true'