Urgent.News

What's breaking now, across thousands of outlets.

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 ps --filter "name=mi-servicio" --format "table {{.Names}} \t {{.Status}}" You're going to see two different stories. docker ps might say Up 3 minutes (healthy) . Kubernetes, meanwhile, has zero idea…

Docker's HEALTHCHECK is a feature that runs inside the Docker daemon and reports its status to Docker inspect. This information is not used by Kubernetes when determining whether a pod is ready to receive traffic. Kubernetes relies on its own health checks: livenessProbe, readinessProbe, and startupProbe, which are defined in the pod's manifest.

If a pod is started and Docker reports it as healthy, Kubernetes will still send traffic to the pod, potentially causing issues if the application is not fully ready. This discrepancy can lead to unexpected behavior and require teams to set up separate health checks in their Kubernetes manifests to ensure proper routing and functionality.

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

More from Friday 28 August →