Docker and CI/CD · Middle · Question 63 of 75
Readiness vs liveness probe in Kubernetes: what's the difference?
- 1Readiness restarts the container; liveness gates traffic
- 2Both restart the container, only at different intervals
- ✓Correct answer: Readiness gates traffic; liveness restarts a stuck container
Explanation
A pod that isn't ready is removed from Service endpoints but not restarted. Don't let liveness depend on the database, or an outage restarts every pod.