Readiness Probe
In one line
A readiness probe checks if a container is ready to handle requests; if it fails, the container is removed from the Service's endpoints.
In simple words
A readiness probe tells Kubernetes whether your container is ready to receive traffic. If the probe fails, Kubernetes removes the container from the Service's endpoint list — no traffic is sent to it, but it is NOT restarted.
This is different from a liveness probe. A container might be running (liveness passes) but not ready — for example, it might still be loading a large dataset, warming up caches, or waiting for a database connection. During this time, you do not want to send user requests to it.
Once the readiness probe starts succeeding, Kubernetes adds the container back to the Service's endpoints and starts sending traffic. This is especially useful during rolling updates — new containers do not receive traffic until they are ready.
Example
apiVersion: v1
kind: Pod
metadata:
name: my-app
spec:
containers:
- name: my-app
image: my-app:latest
readinessProbe:
httpGet:
path: /ready
port: 8080
initialDelaySeconds: 5
periodSeconds: 10This readiness probe calls /ready every 10 seconds. Until it returns 200, no traffic is sent to this container.
How it works
- Kubernetes calls the readiness probe at regular intervals.
- If the probe succeeds, the container is added to the Service's endpoints.
- If the probe fails, the container is removed from endpoints (no traffic).
- The container is NOT restarted — it stays running but receives no requests.
Common confusions
Confused with: Liveness Probe
The difference: A readiness probe controls traffic routing (remove from Service if not ready); a liveness probe controls restarts (restart if not alive).
Related terms
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.