Pod Lifecycle and Probes#
Understanding how Kubernetes starts, monitors, and stops pods is essential for running reliable services. Misconfigurations here cause cascading failures, dropped requests, and restart loops that are difficult to diagnose.
Pod Startup Sequence#
When a pod is scheduled, this is the exact order of operations:
- Init containers run sequentially. Each must exit 0 before the next starts.
- All regular containers start simultaneously.
- postStart hooks fire (in parallel with the container’s main process).
- Startup probe begins checking (if defined).
- Once the startup probe passes, liveness and readiness probes begin.
Init Containers#
Init containers run before your application containers and are used for setup tasks: waiting for a dependency, running database migrations, cloning config from a remote source.