<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/a-missing-binary-d2orncubs" -->

---
title: A Missing Binary Turned a Kubernetes Liveness Probe Into...
description: A background Node.js worker consuming jobs from Redis kept entering CrashLoopBackOff because its Kubernetes liveness probe used an exec check (pgrep) that...
canonical: https://daily.dev/posts/a-missing-binary-turned-a-kubernetes-liveness-probe-into-a-restart-loop-d2orncubs
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: A Missing Binary Turned a Kubernetes Liveness Probe Into a Restart Loop | daily.dev
og:description: A background Node.js worker consuming jobs from Redis kept entering CrashLoopBackOff because its Kubernetes liveness probe used an exec check (pgrep) that...
og:url: https://daily.dev/posts/a-missing-binary-turned-a-kubernetes-liveness-probe-into-a-restart-loop-d2orncubs
og:image: https://api.daily.dev/og/posts/D2ornCubs.png
og:image:alt: A Missing Binary Turned a Kubernetes Liveness Probe Into a Restart Loop
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# A Missing Binary Turned a Kubernetes Liveness Probe Into a Restart Loop

**[Cloud Native Now](https://daily.dev/sources/cloudnativenow)** · 5 min read · 27 upvotes · 2 comments

## Summary

A background Node.js worker consuming jobs from Redis kept entering CrashLoopBackOff because its Kubernetes liveness probe used an exec check (pgrep) that didn't exist in the slim runtime image, causing kubelet to treat every check as a failure. The fix replaced the exec probe with an HTTP /health endpoint that only confirmed the Node.js event loop was responsive, and added a separate /ready endpoint that pinged Redis with a timeout. The piece explains why liveness and readiness must carry different responsibilities: readiness failures remove a Pod from Service endpoints but cannot stop a worker pulling jobs directly from Redis, since Kubernetes has no visibility into queue consumption outside of Services. Draining a queue on shutdown or during a dependency outage requires explicit application-level logic (pausing or closing the consumer), not just probe status.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://cloudnativenow.com/contributed-content/a-missing-binary-turned-a-kubernetes-liveness-probe-into-a-restart-loop>

## Questions this post answers

### Why does a Kubernetes exec liveness probe using pgrep fail in a slim Node.js container image?

Slim runtime images often omit utilities like pgrep, so the exec probe command cannot run at all. Kubelet treats the failed execution itself as a liveness failure, not just a negative health result, which repeatedly restarts an otherwise healthy process and can push the container into CrashLoopBackOff.

_Anyone debugging probe-induced restart loops can find similar Kubernetes health-check breakdowns on daily.dev._

### Should a Kubernetes liveness probe for a worker check Redis connectivity?

No, tying liveness to an external dependency like Redis is risky because restarting the worker won't fix a Redis outage. If every worker's liveness check depends on the same external service, one Redis incident can trigger a wave of simultaneous restarts, turning a single outage into a larger operational failure.

_Teams designing resilient health checks for queue workers can track these patterns on daily.dev._

### Can Kubernetes readiness probes stop a background worker from consuming jobs from a queue like Redis?

No, readiness only controls Pod status and removal from Kubernetes Service endpoints, so it has no effect on a worker pulling jobs directly from Redis outside of any Service. Stopping job intake requires the application or queue library to explicitly pause or close the consumer; the readiness probe can only report that state, not enforce it.

_Developers building queue-based workers can follow these Kubernetes readiness nuances on daily.dev._

## Community discussion

Top comments from developers on daily.dev.

**@ristotoldsep** · 0 upvotes

> A missing `pgrep` causing a restart loop is painfully believable. Great breakdown.

**@nahum** · 0 upvotes

> readiness only pulls you out of Service endpoints. a worker pulling from Redis doesnt care and keeps eating jobs, so draining has to live in the app.
>
> also pgrep in a slim image is a trap I'd 100% walk into.. did you add a probe check to CI after this?

## Similar posts on daily.dev

- [How Kubernetes Health Checks Brought Down a Payment Service](https://daily.dev/posts/how-kubernetes-health-checks-brought-down-a-payment-service-jxkwnhtv6) · Medium · 12 upvotes · 0 comments
- [Why Your Kubernetes Readiness Probes Are Lying During Rolling Updates](https://daily.dev/posts/why-your-kubernetes-readiness-probes-are-lying-during-rolling-updates-yc6emhkvi) · Cloud Native Now · 3 upvotes · 1 comments
- [The hidden failure paths that affect Kubernetes control plane availability](https://daily.dev/posts/the-hidden-failure-paths-that-affect-kubernetes-control-plane-availability-qtcv11wbq) · The New Stack · 0 upvotes · 0 comments
- [The Healthcheck Was Green. The Process Inside Had Been Dead for 19 Minutes](https://daily.dev/posts/the-healthcheck-was-green-the-process-inside-had-been-dead-for-19-minutes-gsse9ynae) · Medium · 0 upvotes · 0 comments
- [CrashLoopBackOff in Kubernetes: The Real Causes and How We Fix It](https://daily.dev/posts/crashloopbackoff-in-kubernetes-the-real-causes-and-how-we-fix-it-odapgy48g) · Cast AI · 3 upvotes · 1 comments

---

Tags: [#kubernetes](https://daily.dev/tags/kubernetes), [#nodejs](https://daily.dev/tags/nodejs), [#redis](https://daily.dev/tags/redis)

[View this post on daily.dev](https://daily.dev/posts/a-missing-binary-turned-a-kubernetes-liveness-probe-into-a-restart-loop-d2orncubs)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"A Missing Binary Turned a Kubernetes Liveness Probe Into a Restart Loop","url":"https://daily.dev/posts/a-missing-binary-turned-a-kubernetes-liveness-probe-into-a-restart-loop-d2orncubs","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/a-missing-binary-turned-a-kubernetes-liveness-probe-into-a-restart-loop-d2orncubs"},"datePublished":"2026-09-25T11:39:15.045Z","dateModified":"2026-09-25T11:39:42.071Z","description":"A background Node.js worker consuming jobs from Redis kept entering CrashLoopBackOff because its Kubernetes liveness probe used an exec check (pgrep) that...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/db3ad83bfb0fd35354c6fc3a28de6b00?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/db3ad83bfb0fd35354c6fc3a28de6b00?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Cloud Native Now","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Cloud Native Now","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/8acc1ecd93ce4299b615252f32d78de5","url":"https://daily.dev/sources/cloudnativenow"},"commentCount":2,"discussionUrl":"https://daily.dev/posts/a-missing-binary-turned-a-kubernetes-liveness-probe-into-a-restart-loop-d2orncubs","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":27},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":2}],"keywords":"kubernetes,nodejs,redis","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Cloud Native Now","item":"https://daily.dev/sources/cloudnativenow"},{"@type":"ListItem","position":3,"name":"A Missing Binary Turned a Kubernetes Liveness Probe Into a Restart Loop"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/a-missing-binary-turned-a-kubernetes-liveness-probe-into-a-restart-loop-d2orncubs","comment":[{"@type":"Comment","text":"A missing pgrep causing a restart loop is painfully believable. Great breakdown.","datePublished":"2026-09-29T10:36:09.648Z","url":"https://daily.dev/posts/D2ornCubs#c-TbSoTg8Xc","author":{"@type":"Person","name":"Risto Tõldsep","url":"https://daily.dev/ristotoldsep","image":"https://lh3.googleusercontent.com/a/ACg8ocLDWc6mZn0JwNmXXw6WY0L_HJ6pegzRttooC5VgtXESHSj3MNYx=s96-c"}},{"@type":"Comment","text":"readiness only pulls you out of Service endpoints. a worker pulling from Redis doesnt care and keeps eating jobs, so draining has to live in the app.\nalso pgrep in a slim image is a trap I’d 100% walk into… did you add a probe check to CI after this?","datePublished":"2026-10-01T17:33:08.643Z","url":"https://daily.dev/posts/D2ornCubs#c-SL489pDxz","author":{"@type":"Person","name":"Nahum Litvin","url":"https://daily.dev/nahum","image":"https://lh3.googleusercontent.com/a-/AOh14GhvJ2y-9R45d5ee78ZdAo8l7J3t4G8fINkx5PEqBfA=s100"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/a-missing-binary-turned-a-kubernetes-liveness-probe-into-a-restart-loop-d2orncubs#faq","mainEntity":[{"@type":"Question","name":"Why does a Kubernetes exec liveness probe using pgrep fail in a slim Node.js container image?","acceptedAnswer":{"@type":"Answer","text":"Slim runtime images often omit utilities like pgrep, so the exec probe command cannot run at all. Kubelet treats the failed execution itself as a liveness failure, not just a negative health result, which repeatedly restarts an otherwise healthy process and can push the container into CrashLoopBackOff. Anyone debugging probe-induced restart loops can find similar Kubernetes health-check breakdowns on daily.dev."}},{"@type":"Question","name":"Should a Kubernetes liveness probe for a worker check Redis connectivity?","acceptedAnswer":{"@type":"Answer","text":"No, tying liveness to an external dependency like Redis is risky because restarting the worker won't fix a Redis outage. If every worker's liveness check depends on the same external service, one Redis incident can trigger a wave of simultaneous restarts, turning a single outage into a larger operational failure. Teams designing resilient health checks for queue workers can track these patterns on daily.dev."}},{"@type":"Question","name":"Can Kubernetes readiness probes stop a background worker from consuming jobs from a queue like Redis?","acceptedAnswer":{"@type":"Answer","text":"No, readiness only controls Pod status and removal from Kubernetes Service endpoints, so it has no effect on a worker pulling jobs directly from Redis outside of any Service. Stopping job intake requires the application or queue library to explicitly pause or close the consumer; the readiness probe can only report that state, not enforce it. Developers building queue-based workers can follow these Kubernetes readiness nuances on daily.dev."}}]}
```

