Urgent.News

What's breaking now, across thousands of outlets.

Tech

Docker dice "healthy" y el pod sigue mandando tráfico roto

Corré esto en cualquier clúster de Kubernetes que tenga contenedores con HEALTHCHECK definido en su Dockerfile y sin livenessProbe ni readinessProbe configurados en el manifiesto: kubectl get pods -o wide docker ps --filter "name=mi-servicio" --format "table {{.Names}} \t {{.Status}}" Vas a ver dos historias distintas. docker ps capaz dice Up 3 minutes (healthy) . Kubernetes, mientras tanto, no…

The headline suggests that Docker does not provide a reliable health check mechanism, and Kubernetes ignores this Docker feature. The source material explains that Kubernetes has its own set of probes for determining if a container is healthy, which are distinct from Docker's HEALTHCHECK feature. The author argues that Docker's HEALTHCHECK is more like a log with health check features rather than a true health check mechanism.

Docker only reports the health check status to Kubernetes when the container is started, and Kubernetes does not take into account Docker's HEALTHCHECK status after that. Kubernetes instead relies on its own livenessProbe, readinessProbe, and startupProbe to determine the health of a container. The author points out that there is no automatic translation between Docker's HEALTHCHECK and Kubernetes' probes, which can lead to a false sense of security in Kubernetes deployments.

The author also discusses the implications of using Docker's HEALTHCHECK in conjunction with Kubernetes' probes and Compose's depends_on: condition: service_healthy. They caution that simply exposing a /health endpoint may not provide the same level of health check functionality as Kubernetes' own probes, and that relying on Docker's HEALTHCHECK alone can lead to unexpected behavior in Kubernetes deployments.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Boorman and the Devil Review

Review: John Boorman and the Devil is a fun and engrossing look at the creation of what is considered to be one of the worst sequels ever made.

Docker Says "Healthy" and the Pod Keeps Sending Broken Traffic

Run this on any Kubernetes cluster that has containers with HEALTHCHECK defined in their Dockerfile and no livenessProbe or readinessProbe configured in the manifest: kubectl get pods -o wide docker…

  • Docker's HEALTHCHECK runs inside Docker daemon, reports status to Docker inspect.
  • Kubernetes relies on its own health checks: livenessProbe, readinessProbe, startupProbe.
  • Pod may receive traffic despite Docker reporting it as healthy, causing potential issues.

More from Friday 28 August →