Skip to content
shiporbreak

No streak yet

Sign in

October 16, 2026 路 #30

KubernetesMediumOpen write-up

The probe that restarted a healthy pod

During a 30-second database failover, every API pod restarted. Which block caused that?

readinessProbe:
  httpGet:
    path: /ready
    port: 8080
livenessProbe:
  httpGet:
    path: /healthz
    port: 8080
  periodSeconds: 10
  failureThreshold: 3

Next puzzle in UTC

One try. The first answer sticks.

How to fix it

Liveness failures restart the container. If /healthz depends on the database, a database blip restarts every pod at once. Point liveness at a process check and keep dependencies on readiness.

/healthz in this service opens a database connection and runs select 1. Three failures, ten seconds apart, and the kubelet restarts the container. During a failover every pod does that together. The database comes back to a thundering herd of cold processes, which is a worse outage than the thirty seconds you started with.

Readiness already exists in this manifest. That is the probe that should fail when a dependency is down. A pod that fails readiness stays alive and stops receiving traffic. A pod that fails liveness is deleted.

Fix

Make /healthz check only that the process can answer. Deadlock, a stuck event loop, a wedged lock. Make /ready check the database, the queue, and anything else that means "do not send users yet."

livenessProbe:
  httpGet:
    path: /healthz
    port: 8080
readinessProbe:
  httpGet:
    path: /ready
    port: 8080

Keep the dependency check out of liveness even if the handler is convenient to reuse. Add a test that boots the process with the database firewalled and asserts the liveness endpoint still returns 200.

Sponsor this spot

Put your tool on the puzzle
One labeled card, in front of engineers who show up every day from YouTube, TikTok, and Instagram.