Bird
0
0

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📝 Troubleshoot Q14 of 15
Kubernetes - Health Checks and Probes
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?
AThe initial delay is too short; increase <code>initialDelaySeconds</code> to allow startup time.
BThe period is too long; decrease <code>periodSeconds</code> to check faster.
CThe probe path is incorrect; change it to <code>/healthz</code>.
DThe container image is corrupted; rebuild the image.
Step-by-Step Solution
Solution:
  1. Step 1: Analyze probe timing settings

    If initialDelaySeconds is too short, the probe runs before the app is ready, causing false failures.
  2. Step 2: Adjust initial delay

    Increasing initialDelaySeconds gives the container time to start before probing, preventing unnecessary restarts.
  3. Final Answer:

    The initial delay is too short; increase initialDelaySeconds to allow startup time. -> Option A
  4. Quick Check:

    Short initialDelay causes early probe failure [OK]
Quick Trick: 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

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes