Kubernetes Ignores Docker HEALTHCHECK, Routing Traffic to Unready Pods
Containers running on Kubernetes can report as 'healthy' via Docker's built-in HEALTHCHECK while still receiving live traffic before the application is ready. This happens because Kubernetes' kubelet does not read Docker's internal health state; it relies solely on its own livenessProbe, readinessProbe, and startupProbe defined in the pod manifest. Without a readinessProbe configured, Kubernetes marks a pod ready to receive traffic the moment the container process starts, regardless of application state. Docker Swarm, by contrast, does read Docker's HEALTHCHECK and will pull an unhealthy container from rotation accordingly. Developers migrating from Swarm or Docker Compose to Kubernetes must explicitly define Kubernetes-native probes in their manifests to ensure traffic is only routed to fully initialized pods.
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