Skip to content
Opsfolk

Running applications, topic 8 of 61

Init and sidecar containers

Optional

An init container runs to completion before the app's containers start: to wait for a database, fetch a file or set permissions. A sidecar container starts before the app and keeps running beside it, for a proxy, a log shipper or a certificate refresher.

Since Kubernetes 1.29 a sidecar is declared as an init container with restartPolicy: Always, so it starts first and stops last. These patterns are part of the CKAD's application design domain.

On Opsfolk

Elsewhere

Your progress