Challenge, Easy,  on  Kubernetes

Multi-Container Pod Security Design

Scenario

You need to create a Pod with two containers that run as different users but share a common group ID for file access. This is a common pattern when multiple containers need to collaborate on shared files while maintaining process isolation.


Tasks

  1. Create a Pod named twin-uid in the sec-ctx namespace.
  2. Configure two containers in the Pod:
    • Container named preproc running as user ID 1000
    • Container named shipper running as user ID 2000
  3. Both containers must use the image public.ecr.aws/docker/library/busybox:stable.
  4. Configure both containers to remain running (use a command like sleep infinity).
  5. Set a Pod-level security context with fsGroup so both containers can share file access.

Test Cases

Level up your Server Side game — Join 20,000 engineers who receive insightful learning materials straight to their inbox