Lab
Health Probes
Tell Kubernetes when a Pod is ready for traffic and when to restart it: readiness and liveness probes.
Your mission
A running container is not the same as a working one. A process can be up while it is still loading, deadlocked, or serving errors. Kubernetes uses probes to tell the difference:
- a readiness probe decides whether a Pod should receive traffic. Fail it and the Pod is quietly removed from Service endpoints until it recovers — no restart.
- a liveness probe decides whether a container is healthy. Fail it enough times and the kubelet restarts the container.
Without a readiness probe, traffic hits a Pod the moment it starts, before it can serve. Without a liveness probe, a wedged process stays wedged. In this lab you add both to a web Deployment.
Useful aliases
In your terminal, k is aliased to kubectl and completion is
configured. The jumpbox also has k9s, jq and yq installed.
Skills you'll put into practice
probeshealthworkloads