A pod in this namespace asks to run as root. What happens?
kind: Namespace
metadata:
name: payments
labels:
pod-security.kubernetes.io/enforce: restricted
- It runs, and a warning is shown
- It is evicted after a grace period
- It is rejected when it is admitted
- It is quietly switched to a user id
Pod Security Admission in enforce mode refuses pods that violate the level; the restricted level requires running as non-root. The warn and audit modes only report.
Play DevOps ▸