Misconfigured Kubernetes Liveness Probe Caused Pod to Restart Every 40 Seconds
A Kubernetes pod was silently restarting every 40 seconds due to a misconfigured liveness probe, causing intermittent connection drops for users while availability metrics appeared nearly normal. The application required around 30 seconds to warm up its cache on startup, but the liveness probe was firing after just 5 seconds with a short timeout, leading kubelet to repeatedly kill and restart the pod. The root cause was a common misconfiguration: using a liveness probe for a slow-start scenario that should instead be handled by a readiness probe, which controls traffic routing rather than process health. The fix involved separating the two probes correctly, adding a startup probe to allow the application to initialize without interference, and raising CPU limits that had been throttling the pod during warm-up. The incident highlights that Kubernetes health probes are a deliberate contract with the orchestrator and must be configured thoughtfully rather than copied from boilerplate templates.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in