Back to lesson: Inject Config via Env, Volumes and Immutable Objects
Free lab · CKAD Prep Program · Module 5: Environment, configuration and security
Multi-container pod
30 min hands-on · Core
Browser Kubernetes (Killercoda 1-node) or Play-with-Kubernetes; no local installs.
Two ways to do this lab: in your browser on Killercoda (free, no install), or on Play-with-Kubernetes as a free practice field. The Killercoda button opens in a new tab; this study page stays here. Killercoda runs one free scenario at a time: if you see a waiting queue, close other Killercoda tabs and wait a minute.
Objectives
- Build a sidecar that ships the main container's logs
- Share one volume between two containers correctly
- Set requests and limits that match observed usage
Step 1
Sidecar log shipper
Run a main container writing to a shared emptyDir plus a sidecar tailing that file to stdout. Prove both containers see the same file from inside each one.
Step 2
Rightsize it
Observe usage with `kubectl top`, then set requests near the floor and limits near the ceiling. Explain in one sentence why each number sits where it does.
How to confirm it worked
- Same file readable from both containers
- Requests and limits set with one-sentence justification each