Readiness and liveness probes
We touched upon readiness probes briefly in the previous section. In this section, we'll explore them in more depth.
Kubernetes uses liveness and readiness probes to monitor the availability of your applications. Each probe serves a different purpose:
- A liveness probe monitors the availability of an application while it is running. If a liveness probe fails, Kubernetes will restart your Pod. This could be useful to catch deadlocks, infinite loops, or just a "stuck" application.
- A readiness probe monitors when your application becomes available. If a readiness probe fails, Kubernetes will not send any traffic to unready Pods. This is useful if your application has to go through some configuration before it becomes available, or if your application could become overloaded but recover from the additional load.
Liveness and readiness probes don't need to be served from the same endpoint in your application. If you...