Kubernetes · Orchestration under pressure

When should you use liveness, readiness and startup probes?

MediumprobeshealthreliabilityUpdated Oct 2026
Quiz this track

Short answer

Liveness restarts a stuck container, readiness removes a pod from Service endpoints, and startup protects slow-starting apps from premature liveness restarts.

Each probe answers a different question. Liveness asks whether the process should be restarted. Readiness asks whether it can serve traffic right now. Startup asks whether initialization has finished, and while it runs, liveness and readiness checks are suppressed.

  • Liveness should check the process itself, not downstream dependencies
  • Readiness should reflect the ability to serve requests, including warm caches and dependency checks
  • Startup probes are for slow boots such as JVM or model loading
  • Set initialDelaySeconds, periodSeconds, timeoutSeconds, failureThreshold and successThreshold deliberately
  • A liveness probe that depends on a database can restart every pod during a database outage
yaml
startupProbe:
  httpGet:
    path: /healthz
    port: 8080
  failureThreshold: 30
  periodSeconds: 2
readinessProbe:
  httpGet:
    path: /ready
    port: 8080
  periodSeconds: 5
  failureThreshold: 3
livenessProbe:
  httpGet:
    path: /healthz
    port: 8080
  periodSeconds: 10
  failureThreshold: 3

Probes are part of rollout safety. If readiness is wrong, a broken release receives traffic. If liveness is too aggressive, healthy pods restart during load. Test probes under real startup and dependency failure conditions rather than assuming the endpoints behave correctly.

Probe endpoints should be cheap. Expensive health checks that hit the database on every probe add load and can create a feedback loop during incidents.

Follow-ups you should expect

Interviewers use these to check whether the first answer was understanding or memorisation.

  1. 1Why is a database check a bad liveness probe?
  2. 2What does a startup probe prevent?
  3. 3How do readiness probes affect rolling updates?
  4. 4What timeout and threshold values would you choose for a slow JVM service?

Say it in the interview

I use readiness to control traffic, liveness to restart a wedged process and startup to protect slow boots. The key is that liveness should test the process, not downstream dependencies, otherwise a database outage restarts the whole fleet. Readiness can be stricter because removing a pod from endpoints is safer than killing it. I tune thresholds from real startup and load behaviour and keep probe handlers cheap.

Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.

Related questions

Reading is step one

Now say it out loud.

Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live Kubernetes mock interview and get scored feedback on depth, clarity and confidence.