A container's securityContext limits what its process may do. runAsNonRoot: true with a runAsUser keeps it off root; allowPrivilegeEscalation: false stops it gaining more; capabilities: {drop: [ALL]} removes root's special powers; readOnlyRootFilesystem: true stops writes outside volumes; seccompProfile: RuntimeDefault filters system calls. A Pod-level securityContext sets defaults for every container.
Pod Security admission enforces these per namespace through labels such as pod-security.kubernetes.io/enforce=restricted. The levels are privileged (anything), baseline (blocks the dangerous settings: privileged containers, host namespaces, hostPath) and restricted (requires the hardened settings above). Each level can be set to enforce (refuse), warn or audit.
Enforcement acts when Pods are created, so a Deployment in a newly restricted namespace keeps its old Pods and fails on new ones with a FailedCreate event that lists every violation.
A hardened container.