What are health checks, readiness probes, and liveness probes?

Answer

Health checks are endpoints (typically /health) that a service exposes to indicate whether it is functioning correctly. In Kubernetes, there are two specific types: A liveness probe checks whether a service is alive — if it fails repeatedly, Kubernetes restarts the container. This handles hung or deadlocked processes. A readiness probe checks whether a service is ready to accept traffic — if it fails, Kubernetes removes the pod from the Service load balancer without restarting it. This prevents traffic from being routed to a service that is still warming up, connecting to its database, or temporarily overloaded. Both probes are essential for zero-downtime deployments and reliable operation.