You are troubleshooting a pod that fails to start because it attempts to run a container with privileges. The cluster enforces the 'baseline' Pod Security Standard. Which container configuration will cause the Pod Security Admission controller to reject the pod?
Trap 1: Mounting an emptyDir volume into the container.
emptyDir volumes are permitted under both baseline and restricted standards.
Trap 2: Omitting the 'runAsUser' field, allowing the container to run as…
Running as root (UID 0) is permitted under the baseline standard (though forbidden under restricted).
Trap 3: Adding the 'NET_BIND_SERVICE' capability to the container.
NET_BIND_SERVICE is allowed under the baseline standard.
- A
Mounting an emptyDir volume into the container.
Why wrong: emptyDir volumes are permitted under both baseline and restricted standards.
- B
Omitting the 'runAsUser' field, allowing the container to run as UID 0 by default.
Why wrong: Running as root (UID 0) is permitted under the baseline standard (though forbidden under restricted).
- C
Setting 'securityContext.privileged: true' on the container.
Privileged containers are explicitly prohibited by both baseline and restricted Pod Security Standards.
- D
Adding the 'NET_BIND_SERVICE' capability to the container.
Why wrong: NET_BIND_SERVICE is allowed under the baseline standard.