Exec Probe Configuration in Kubernetes
📖 Scenario: You are managing a Kubernetes deployment for a simple web application. You want to ensure the application container is healthy by running a command inside the container periodically. This helps Kubernetes know if the container is working properly and restart it if needed.
🎯 Goal: Configure an exec liveness probe in a Kubernetes Pod manifest that runs a command inside the container to check its health.
📋 What You'll Learn
Create a Pod manifest with a container named
webappAdd an
exec liveness probe that runs the command ['cat', '/tmp/healthy']Set the probe to run every 5 seconds
Print the final Pod manifest YAML
💡 Why This Matters
🌍 Real World
Exec probes are used in Kubernetes to check container health by running commands inside containers. This helps keep applications running smoothly by restarting unhealthy containers automatically.
💼 Career
Understanding exec probes is essential for Kubernetes administrators and DevOps engineers to maintain reliable containerized applications.
Progress0 / 4 steps