Kubernetes, the leading container orchestration platform, offers a variety of features to ensure that applications run smoothly and efficiently. Among these features, Readiness and Liveness Probes stand out as essential tools for maintaining application health. In this post, we’ll delve deep into the world of these probes, exploring their significance, best practices, and providing a hands-on lab to solidify your understanding.
TL;DR: The Why of Probes
Readiness Probes add a validation layer before marking pod as ready. If probe fails, the traffic will be stopped.
Liveness Probes determine if a pod is alive and functioning correctly. If fails, the pod will be restarted.
When to Use Probes
Readiness Probes:
- Initialization Delays: If your application requires some warm-up time or needs to perform certain tasks before accepting traffic.
- Database Migrations: Before serving traffic, the application might need to ensure database schemas are updated.
- Dependent Services: If your application needs to ensure other services are available before it starts.
