JuniorKubernetes

What is the difference between a liveness probe and a readiness probe, and what happens if you configure them wrong?

What they are really testing: A favourite because getting it backwards causes spectacular outages. They want to hear the different consequences: restart versus removal from load balancing.

A real interview question

What is the difference between a liveness probe and a readiness probe, and what happens if you configure them wrong?

What most people say

drag me

Liveness checks if the app is alive and readiness checks if it is ready.

It restates the names without the consequences. The whole point is that one restarts the container and the other only removes traffic, and a candidate who cannot name that will eventually put a database check in a liveness probe.

The follow-ups they ask next

  • Your app takes 90 seconds to start and keeps getting killed. What do you change?

    Add a startup probe with a generous failure threshold. Liveness does not begin until it passes, so you keep tight liveness timings without killing slow boots.

  • Should the readiness endpoint check the database?

    Sometimes, if the service is useless without it, since that sheds traffic instead of restarting. But be careful: if every pod does it, the whole service leaves rotation together during a blip.

What the interviewer is listening for

  • Names restart versus traffic removal
  • Warns against dependency checks in liveness
  • Knows startup probes

What sinks the answer

  • Restates the names only
  • Would check dependencies in liveness
  • Unaware failing readiness leaves the pod running

If you genuinely do not know

Say this instead of freezing. Reasoning out loud from what you do know beats silence every single time, and a good interviewer is listening for exactly that.

Liveness means [restart this container if it fails], readiness means [stop sending traffic but keep it running]. The classic mistake is [checking a dependency in liveness], which turns [a brief database blip into a cluster-wide restart loop]. Slow starts need [a startup probe].

Keep going with kubernetes

All 87 devops engineer questions

Knowing the answer is not the same as recalling it under pressure

Sign in to send the questions you fumble to spaced recall, so they come back right before you would forget them, and learn the concepts behind them with hands-on labs.

Start free