An init container runs to completion before your app container starts, and only then does the app run. It is the clean place for setup that must happen first and must succeed. It is also reached for far too often, for things that belong in the image, in the app, or nowhere. Here is what it is for, what changed with native sidecars, and when not to use it.
tag: #design-patterns
2 posts
A pod can hold more than one container, and the sidecar pattern uses that to attach capabilities to an application without changing the application. Logging, proxying, secret rotation, config watching, all bolted on beside the main container, sharing its network and storage. Here is what it is for, why it works, and when it turns into bloat.