DevOps Engineer interview question

What is the difference between readiness and liveness probes?

Readiness decides whether a pod receives traffic; liveness decides whether Kubernetes restarts it. A dependency outage should usually fail readiness, not liveness, or restarts can amplify the incident.

Direct answer

What a strong answer covers

How it works

Readiness answers whether this pod should receive traffic right now; failing it removes the pod from Service endpoints without touching the process, which is the correct response to a slow start, a warming cache, or a dependency that is temporarily unreachable. Liveness answers whether the process is stuck beyond recovery; failing it restarts the container, which is only right for deadlocks and hung event loops. Startup probes hold both off until a slow application has booted. A liveness probe that checks a database turns a database blip into a restart storm across the fleet.

Example

A payment service defines a startup probe with a 2-minute budget for JVM warm-up, a readiness probe on /ready that checks the connection pool and a circuit breaker state, and a liveness probe on /live that only checks the HTTP server responds. When the database failed over for 20 seconds, pods went unready and traffic paused instead of every pod restarting and losing its warm caches.

Common mistakes

  • Pointing liveness at a dependency check and amplifying outages with restarts.
  • Having no readiness probe so a deploy sends traffic to pods still booting.
  • Setting the same tight timeout on all probes without measuring real start time.

A useful answer structure

Answer from your own work.

Do not memorise a script: use only examples you can explain honestly in follow-up questions.

Practise this answer with MiraHint

Open the desktop workspace and rehearse a clear answer in your own words.

Download MiraHint
DevOps Engineer interview questions