A security administrator wants to prevent container processes from writing to any part of their root filesystem except for designated ephemeral volumes. Which security context field should be configured?
Trap 1: runAsUser: 1000
Running as a non-root UID restricts permissions but does not make the filesystem read-only.
Trap 2: allowPrivilegeEscalation: false
This setting prevents processes from gaining new privileges, not from writing to the filesystem.
Trap 3: privileged: false
While disabling privileged mode is important, it does not make the root filesystem read-only.
- A
runAsUser: 1000
Why it fails: Running as a non-root UID restricts permissions but does not make the filesystem read-only.
- B
readOnlyRootFilesystem: true
Setting readOnlyRootFilesystem to true mounts the container's root filesystem read-only, so processes cannot write anywhere except explicitly mounted volumes. This precisely satisfies the stem's constraint: writes are blocked across the root filesystem while designated ephemeral volumes remain writable.
- C
allowPrivilegeEscalation: false
Why it fails: This setting prevents processes from gaining new privileges, not from writing to the filesystem.
- D
privileged: false
Why it fails: While disabling privileged mode is important, it does not make the root filesystem read-only.