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
- Create a Pod named
twin-uidin thesec-ctxnamespace. - Configure two containers in the Pod:
- Container named
preprocrunning as user ID1000 - Container named
shipperrunning as user ID2000
- Container named
- Both containers must use the image
public.ecr.aws/docker/library/busybox:stable. - Configure both containers to remain running (use a command like
sleep infinity). - Set a Pod-level security context with
fsGroupso 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