When to use Docker HEALTHCHECK vs livenessProbe / readinessProbe When to use Docker HEALTHCHECK vs livenessProbe / readinessProbe kubernetes kubernetes

When to use Docker HEALTHCHECK vs livenessProbe / readinessProbe


If you use Kubernetes, I'd suggest using only the Kubernetes liveness/readiness checks because Docker healthcheck has not been integrated in the Kubernetes as of now (release 1.12). This means that Kubernetes does not expose the check status in its api server, and the internal system components can not consume this information. Also, Kubernetes distinguishes liveness from readiness checks, so that other components can react differently (e.g., restarting the container vs. removing the pod from the list of endpoints for a service), which the docker HEALTHCHECK currently does not provide.

Update: Since Kubernetes 1.8, the Docker HEALTHCHECK has been disabled explicitly in Kubernetes.