Member-only story
What are K8s Pod Probes
In K8s, Pod probes are diagnostics performed periodically by the kubelet
on a container. K8s uses three types of probes, each serving a different purpose:
- Startup probes: These probes indicate whether the application within the container has started successfully. It aims to help slow-starting containers get up and running. If the startup probe fails, K8s will kill the container, and the container’s failure policy will dictate further action (e.g., it may be restarted). This probe is only executed at startup, and once successful, both liveness and readiness probes take over.
- Liveness probes: This ascertains whether the container is running. If the liveness probe fails, K8s will kill the container, and the container’s failure policy will apply. The policy might be to restart the container, in which case the
kubelet
will attempt to restart it. The liveness probe helps to catch situations where an application is running but unable to make progress. - Readiness probes: This investigates whether the container is ready to handle requests. If the readiness probe fails, the Pod will be removed from service load balancers, and won’t receive any traffic through K8s Services. Once the readiness probe passes, the Pod will be capable of taking requests. This feature ensures that only…