Confusing readiness failure with container restart
Thinking container is deleted
Assuming no effect on traffic
4. You notice your container keeps restarting frequently. The liveness probe is configured with initialDelaySeconds: 5 and periodSeconds: 10. What is a likely cause and fix?
medium
A. The initial delay is too short; increase initialDelaySeconds to allow startup time.
B. The period is too long; decrease periodSeconds to check faster.
C. The probe path is incorrect; change it to /healthz.
D. The container image is corrupted; rebuild the image.
Solution
Step 1: Analyze probe timing settings
If initialDelaySeconds is too short, the probe runs before the app is ready, causing false failures.
Step 2: Adjust initial delay
Increasing initialDelaySeconds gives the container time to start before probing, preventing unnecessary restarts.
Final Answer:
The initial delay is too short; increase initialDelaySeconds to allow startup time. -> Option A
Quick Check:
Short initialDelay causes early probe failure [OK]
Hint: Increase initialDelaySeconds if container restarts too soon [OK]
Common Mistakes:
Changing periodSeconds instead of initialDelaySeconds
Assuming probe path is always wrong
Blaming container image without checking probes
5. You have a container with both readiness and liveness probes. The readiness probe fails intermittently, but the liveness probe always passes. How should Kubernetes behave and what is the best way to improve user experience?
hard
A. Kubernetes removes the pod from service during readiness failure but does not restart it; improve by tuning readiness probe thresholds.
B. Kubernetes restarts the container on readiness failure; improve by disabling readiness probe.
C. Kubernetes ignores readiness probe failures if liveness passes; no action needed.
D. Kubernetes deletes the pod on readiness failure; improve by increasing liveness probe timeout.
Solution
Step 1: Understand probe roles on intermittent readiness failure
Readiness failure removes pod from service endpoints but does not restart container if liveness passes.
Step 2: Improve user experience by tuning readiness probe
Tuning thresholds like failureThreshold or periodSeconds reduces false negatives and prevents unnecessary traffic disruption.
Final Answer:
Kubernetes removes the pod from service during readiness failure but does not restart it; improve by tuning readiness probe thresholds. -> Option A
Quick Check:
Readiness fail = no traffic; tune probe to reduce false failures [OK]
Hint: Tune readiness probe to avoid false failures and traffic loss [OK]
Common Mistakes:
Thinking readiness failure restarts container
Disabling readiness probe instead of tuning
Ignoring intermittent failures
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.