Exercise 2: Init Container vs. Sidecar — The Timing Difference — Possible Solution ==================================================================== The core difference, per the chapter: TIMING relative to the main container. INIT CONTAINER: runs to COMPLETION BEFORE the main container(s) even START. It performs some setup or prerequisite task -- for example, waiting for a dependency to become available, or preparing some data the main container needs -- and then EXITS. Only once the init container has finished successfully does Kubernetes start the pod's main container(s) at all. An init container is never running AT THE SAME TIME as the main container -- its entire job happens first, then it's done. SIDECAR: runs ALONGSIDE the main container, for the SAME DURATION. Both start around the same time (or the sidecar may start once the main container is ready) and both continue running together for as long as the pod exists. A sidecar doesn't complete and exit before the main container starts -- it's actively doing its own ongoing job (like continuously shipping logs, per Exercise 1's example) throughout the pod's entire running lifetime, in parallel with the main container. Put simply: an init container's relationship to the main container is SEQUENTIAL (finish, then the main container starts) -- a sidecar's relationship is CONCURRENT (both run together, continuously, for the whole life of the pod). WHY THIS WORKS AS AN ANSWER ------------------------------ This directly extracts the chapter's own distinguishing detail -- "runs to completion before the main containers start" for init containers vs. "running alongside the main container" for sidecars -- and reframes it explicitly in terms of sequential-vs-concurrent timing, which is the precise dimension the exercise asks about.