Keep Pods Healthy with Liveness and Readiness Probes
Scenario
A namespace named space already exists.A Deployment named app-deployment is running in this namespace.The application inside the Pods listens on port 80.
Add a readiness probe that checks the HTTP path /readyz.Set initialDelaySeconds to 2 and periodSeconds to 5.
Add a liveness probe that checks the HTTP path /healthz.Set initialDelaySeconds to 5, periodSeconds to 10, and failureThreshold to 3.
Apply the changes to the Deployment in the space namespace.Verify that the Deployment updates successfully.Check the Deployment logs to confirm Apache is running.
Review the logs and verify that the /readyz endpoint and all /healthz endpoints are returning HTTP 200 OK responses.