CKAD — Understanding Probes

1 minute read

Why Health Checks Matter

Kubernetes needs to know if your application is healthy. Is it ready to receive traffic? Has it started properly? Is it still alive? Probes answer these questions automatically.

Without probes, Kubernetes only checks if the container process is running. A container can be running but the app inside it may be broken — stuck in a deadlock, failing to connect to a database, or still loading data. Probes let Kubernetes detect these situations and respond.

Three Types of Probes

Probe Purpose What Happens on Failure
Liveness Is the app still running? Kubernetes restarts the container
Readiness Is the app ready for traffic? Kubernetes removes Pod from Service endpoints (stops sending traffic)
Startup Has the app started? Kubernetes waits before activating liveness/readiness probes

When to Use Each Probe

Pod starts → Startup Probe checks → Once passed → Liveness + Readiness probes begin
                                                    │                        │
                                                    │                        │
                                              Still alive?            Ready for traffic?
                                              If no → restart        If no → remove from Service
  • Liveness: Use for deadlock detection. If your app gets stuck and stops responding, the liveness probe fails and Kubernetes restarts it.
  • Readiness: Use when your app needs warm-up time (loading cache, connecting to DB). The Pod stays in the Service only when ready.
  • Startup: Use for slow-starting apps. Prevents liveness probes from killing the container before it finishes starting.

Key insight: Liveness and readiness probes solve different problems. Liveness restarts broken containers. Readiness controls traffic routing. You almost always want both.


Next: Probe Mechanisms

Updated: