Introduction
Sometimes a container might start but not work properly. Container health checks help automatically test if a container is working as expected and restart it if needed.
When you want to make sure a web server inside a container is responding to requests.
When a database container should be restarted if it stops accepting connections.
When you run background jobs and want to detect if they hang or crash.
When you deploy multiple containers and want to keep only healthy ones running.
When you want to automate recovery without manual checks.