9.15 Kubernetes Startup Probe Behavior
Kubernetes Startup Probe Behavior ensures containers are ready by checking their startup process before traffic is directed to them.
Kubernetes Startup Probe Behavior is the mechanism by which the kubelet delays the activation of a container's liveness and readiness probes until an application has confirmed, through its own dedicated startup check, that its initialization process has genuinely completed, protecting slow-starting applications from being prematurely killed or marked unready during a legitimately extended boot sequence.
Purpose and Motivating Problem
The Slow-Start Conflict
Before startup probes existed, configuring a liveness probe for an application with a long, variable initialization time created a conflict: a short initialDelaySeconds risked killing the container before it finished starting, while a long initialDelaySeconds delayed the detection of genuine deadlocks for the entire remaining lifetime of the container, since that same delay applied uniformly regardless of how long the application actually took to start on any given run.
Decoupling Startup Time From Ongoing Health Checks
Startup probes resolve this conflict by introducing a distinct, dedicated phase for confirming initialization, whose own timing budget can be generous and tailored specifically to worst-case startup scenarios, while leaving the subsequent liveness probe's timing configured tightly around genuine steady-state responsiveness expectations.
Configuration Fields
Reused Probe Mechanism Types
A startup probe supports the same underlying check mechanisms available to liveness and readiness probes, including HTTP GET requests, TCP socket connections, exec commands, and gRPC health checks, allowing the same health endpoint or script used elsewhere to also serve as the startup confirmation signal if appropriate.
periodSeconds and failureThreshold as the Effective Timeout
Because a startup probe is retried repeatedly until it succeeds or exhausts its failure threshold, the effective maximum time allowed for startup is approximately the product of periodSeconds and failureThreshold, giving operators a way to express a generous but ultimately bounded startup allowance rather than an unlimited wait.
Suppression of Other Probes
Liveness and Readiness Held Inactive
While a startup probe is configured and has not yet succeeded, the kubelet does not evaluate the container's liveness or readiness probes at all, meaning neither restart-triggering nor traffic-gating logic operates during this window, regardless of what those other probes might otherwise report if they were active.
Transition Upon Success
The moment the startup probe succeeds, the kubelet permanently stops evaluating it for the remaining lifetime of that specific container instance and immediately begins evaluating the liveness and readiness probes on their own independently configured schedules, marking the container's started status field as true.
Failure Handling
Exhausted Failure Threshold Triggers Restart
If the startup probe never succeeds and exceeds its failureThreshold, the kubelet treats this as a startup failure and kills the container, after which it is restarted according to the Pod's restartPolicy, meaning a genuinely broken application will still eventually be cycled rather than left indefinitely waiting in an unconfirmed startup state.
Restart Resets the Startup Probe
Each time a container restarts, whether due to a startup probe failure or any other cause, its startup probe begins evaluation again from the beginning, since the started status is scoped to the current container instance and does not persist across a restart.
Common Application Patterns
Legacy and Data-Heavy Applications
Startup probes are particularly valuable for applications that must load large datasets into memory, run extensive internal consistency checks, or complete a lengthy dependency negotiation process before they can be considered functional, all of which can vary significantly in duration between individual instances or deployments.
Coexistence With Simple Liveness Configuration
By offloading the variable, worst-case startup delay entirely to the startup probe, the corresponding liveness probe can be configured with tight, aggressive timing suited purely to detecting genuine runtime hangs, without needing to account for startup variability at all, resulting in more responsive failure detection once the application is actually running.