Bird
0
0

Consider this pod spec snippet:

medium📝 Predict Output Q4 of 15
Kubernetes - Health Checks and Probes
Consider this pod spec snippet:
readinessProbe:
  tcpSocket:
    port: 3306
  initialDelaySeconds: 10
  periodSeconds: 5

What will Kubernetes do if the container does not accept TCP connections on port 3306 after startup?
ADelete the pod from the cluster
BRestart the container immediately
CIgnore the failure and keep the pod ready
DMark the pod as not ready and stop sending traffic to it
Step-by-Step Solution
Solution:
  1. Step 1: Understand readiness probe behavior

    Readiness probes determine if a pod is ready to receive traffic.
  2. Step 2: Effect of TCP readiness probe failure

    If the TCP probe fails, Kubernetes marks the pod as not ready and stops routing traffic to it.
  3. Step 3: Difference from liveness probe

    Readiness probe failures do not restart the container; that is the liveness probe's role.
  4. Final Answer:

    Mark the pod as not ready and stop sending traffic to it -> Option D
  5. Quick Check:

    Readiness probe failure affects traffic routing, not container lifecycle [OK]
Quick Trick: Readiness probe failure stops traffic, doesn't restart container [OK]
Common Mistakes:
  • Confusing readiness probe failure with liveness probe failure
  • Assuming container restarts on readiness failure
  • Thinking pod is deleted on readiness failure

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes