Kubernetes interview question · Most asked

Liveness, readiness and startup probes: how do you configure them correctly?

Summary

Readiness decides whether a pod receives traffic; liveness decides whether the container is restarted; a startup probe holds off the other two until a slow-starting app is up. Readiness may reflect whether the instance can serve; liveness should only detect a stuck process and must not depend on external systems.

Longer Answer

If liveness checks the database, a database blip restarts every pod at once and turns a partial outage into a full one. Other tips: give probes realistic timeouts and failure thresholds; use a startup probe instead of a huge initialDelaySeconds; make readiness fail during graceful shutdown so the pod leaves the endpoints; and keep probe endpoints cheap.

Missing readiness probes mean pods receive traffic before they can serve, causing errors during every rollout.

Key Points

  • Readiness = traffic; liveness = restart; startup = slow boot.
  • No dependency checks in liveness.
  • Realistic thresholds; startup probe for slow apps.
  • Missing readiness = errors during rollouts.

Deep dive: Site Reliability Engineering interview questions

More most-asked Kubernetes questions

← All Kubernetes questions