Introduction
Sometimes, you want Kubernetes to check if your app inside a container is working well. Exec probes let Kubernetes run a command inside the container to see if it is healthy. If the command fails, Kubernetes knows the app might have a problem and can restart it.
When you want to check if a web server inside a container is running by running a command that tests its status.
When your app does not listen on a network port but can be checked by running a script inside the container.
When you want Kubernetes to restart a container automatically if a specific command inside it fails.
When you want to make sure a database inside a container is ready by running a command that checks its status.
When you want to avoid restarting a container unnecessarily by running a quick command to confirm health.