Introduction
Sometimes pods in Kubernetes can run with unsafe settings that might cause security risks. The Pod Security Admission Controller helps by checking pods when they are created and making sure they follow security rules to keep the cluster safe.
When you want to prevent pods from running as root user to avoid privilege escalation.
When you need to enforce that pods do not use host network or host PID to limit access to the node.
When you want to make sure pods have proper security context settings like read-only root filesystem.
When you want to apply different security policies to different namespaces automatically.
When you want to block pods that do not meet your organization's security standards before they start.