

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 3
click for more info
Not enough gems
Cost: 6 gems
1: Liveness Probes
incomplete
2: Readiness Probes
incomplete
3: Startup Probes
incomplete
4: Broken Cluster
incomplete
This lesson's interactive features are locked, please to keep using them
Okay, so a liveness probe answers the question, "should this container be restarted?", but a readiness probe answers a different one: "should this pod actually get traffic?"
So, when a pod fails its readiness probe, it isn't restarted. Instead:
It's marked as not ready (0/1 in the READY column)
It's removed from its service's endpoints, so it stops getting traffic
Once it passes its checks again, traffic resumes automatically.
readinessProbe:
httpGet:
path: /
port: 8080
periodSeconds: 5Readiness probes allow for zero-downtime "maintenance windows", so that traffic doesn't actually get sent to a pod until it's truly ready to handle it. For example, a web server might be healthy (we don't want to kill it) but want to temporarily stop receiving traffic while it does some background work, like:
Processing a large video file
Rebuilding a cache
Switching to a new database connection
etc.
And with a readiness probe, the server can just return a "not ready" response until it's done, and Kubernetes will keep it out of the load balancer until then.
Add a readiness probe to the web app, then break it.
The old web pod is still around, serving traffic, because the rolling update won't remove it until the new pod is ready.
Submit the shell checks.