Bird
0
0

Consider this startupProbe configuration:

medium📝 Predict Output Q4 of 15
Kubernetes - Health Checks and Probes
Consider this startupProbe configuration:
startupProbe:
  exec:
    command: ["test", "-f", "/tmp/ready"]
  failureThreshold: 5
  periodSeconds: 3
What happens if the file /tmp/ready does not exist during startup?
AThe container will restart immediately without waiting
BThe probe will succeed immediately and the container continues running
CThe container will never restart because startupProbe ignores failures
DThe container will be restarted after 15 seconds of probe failures
Step-by-Step Solution
Solution:
  1. Step 1: Calculate failure timeout

    failureThreshold (5) * periodSeconds (3) = 15 seconds before restart.
  2. Step 2: Understand exec command

    The command checks for file existence; if missing, probe fails.
  3. Step 3: Effect of repeated failures

    After 5 consecutive failures, Kubernetes restarts the container.
  4. Final Answer:

    The container will be restarted after 15 seconds of probe failures -> Option D
  5. Quick Check:

    FailureThreshold x periodSeconds = restart delay [OK]
Quick Trick: FailureThreshold x periodSeconds = restart delay [OK]
Common Mistakes:
  • Assuming immediate restart on first failure
  • Believing probe succeeds if file missing
  • Ignoring failureThreshold effect

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes