A readinessProbe is one of three health checking mechanisms in Kubernetes (along with livenessProbes and startupProbes). Its specific purpose is to determine whether a pod is ready to accept network traffic. When a pod's readinessProbe fails, Kubernetes temporarily removes that pod from the service's load balancing pool.
Liveness Probe: Checks if a container is running and healthy. If the liveness probe fails, the kubelet will kill the container, and it will be subject to the pod's restart policy. This helps to ensure that unhealthy containers are restarted.
Readiness Probe: Checks if a container is ready to serve traffic. If the readiness probe fails, the pod is removed from the endpoints of the associated service, preventing new traffic from being sent to it. The container itself remains running. This allows for a graceful start or recovery period for applications.
Startup Probe: Checks if the application within the container has started. It is useful for applications that might take a long time to initialize. Until a startup probe succeeds, liveness and readiness probes will not start. If the startup probe fails, the kubelet will kill the container, and it will be subject to the pod's restart policy. This prevents premature failure reports from liveness and readiness probes during application startup.