Probe failure and container restart behavior
📖 Scenario: You are managing a Kubernetes cluster running a simple web application. You want to understand how Kubernetes handles container health checks and restarts when probes fail.
🎯 Goal: Learn how to configure liveness and readiness probes in a Kubernetes Pod manifest and observe container restart behavior when probes fail.
📋 What You'll Learn
Create a Pod manifest with a container running the
nginx imageAdd a liveness probe that checks the HTTP endpoint
/healthz on port 80Add a readiness probe that checks the HTTP endpoint
/ready on port 80Simulate probe failure by using incorrect probe paths
Observe and print the Pod status to see container restart behavior
💡 Why This Matters
🌍 Real World
Kubernetes uses probes to check if containers are healthy and ready to serve traffic. Understanding probe failures helps keep applications stable.
💼 Career
DevOps engineers and site reliability engineers configure probes to automate container health checks and manage restarts, improving uptime.
Progress0 / 4 steps