Give a slow starter its startup budget

  • 12 min
  • 5 steps
  • Pods and workloads

Steps

0 of 5 done

A Deployment never becomes available because its liveness probe kills the app before it finishes starting. Read the evidence, measure the startup time, and fix it with a startup probe instead of a weaker liveness probe.

  1. Step 1 of 5

    The ledger pods have restarted since they were created. Find the cluster's record of why the kubelet restarted them.

    Checked against what your commands print.

  2. Step 2, not started: Find out from the app itself how long it expects to take to start.

  3. Step 3, not started: Show that the ledger Service has endpoints for both pods, but that none of them is ready to receive traffic.

  4. Step 4, not started: Add a startup probe to the app container that allows at least 45 seconds, with some margin, for the app to start. Leave the liveness probe exactly as it is, and wait until both replicas are available.

  5. Step 5, not started: Confirm that both endpoints of the ledger Service are ready.

Lab terminal

Cluster time 1 minute 10 seconds
kind cluster kx, Kubernetes 1.37.
Each step is checked as you work.
​
Tab completes. Up and Down recall.
Type help for more.
Terminal keys

Enter runs the command. Tab completes, and the arrow keys recall earlier commands. Control C stops a watch. On an empty line, or after Escape, Tab moves focus out of the terminal.