Urgent.News

What's breaking now, across thousands of outlets.

Tech

Docker says "healthy" and the pod continues to send broken traffic

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…

Translated from Spanish Read in Spanish

The article discusses the differences in how Docker's HEALTHCHECK feature is handled by various container orchestration systems, specifically Docker Swarm, Docker Compose, and Kubernetes. When a HEALTHCHECK is defined in a Dockerfile but no livenessProbe or readinessProbe is configured in the Kubernetes pod manifest, the kubelet is unaware of the HEALTHCHECK and considers the pod running and ready to receive traffic as soon as the process starts.

This can lead to issues, such as a pod being considered healthy by Docker but not by Kubernetes, resulting in unexpected behavior. The article concludes that defining a HEALTHCHECK in a Dockerfile is not enough in Kubernetes, and a readinessProbe must also be defined in the pod manifest.

Written by urgent.news from Dev.to's report — not a translation of it. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

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 →