Using the liveness, readiness, and startup probes in Kubernetes
Kubernetes has multiple types of health checks, called probes, to ensure that the Docker containers it runs are in shape to process traffic. You can read about them in detail at https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/.
The types of probes deal with different concerns:
- Liveness: Determines whether an application can process requests at all.
- Readiness: Determines whether a container is ready to receive real traffic, especially if it depends on external resources that have to be reachable or connected.
- Startup: Determines whether a container is ready to start taking the other two types of traffic, intended for slow-starting legacy applications to give them time to start. As these are mostly needed for legacy applications, we won't cover them in detail.
You can configure probes to execute commands inside a running container, perform...