Overview - Liveness probe concept
What is it?
A liveness probe is a way Kubernetes checks if a container inside a pod is still running and healthy. It regularly tests the container by running a command, making an HTTP request, or opening a TCP connection. If the container fails this check, Kubernetes restarts it to fix problems automatically. This helps keep applications running smoothly without manual intervention.
Why it matters
Without liveness probes, Kubernetes wouldn't know if a container is stuck or broken, so it might keep running a failed app forever. This can cause downtime or bad user experience. Liveness probes let Kubernetes fix problems quickly by restarting unhealthy containers, improving reliability and uptime for users.
Where it fits
Before learning liveness probes, you should understand basic Kubernetes concepts like pods and containers. After this, you can learn about readiness probes, startup probes, and advanced pod lifecycle management to control app behavior more precisely.