0
0
Kubernetesdevops~20 mins

Probe failure and container restart behavior in Kubernetes - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Probe Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
What happens when a liveness probe fails in Kubernetes?

In Kubernetes, if a liveness probe fails repeatedly, what is the expected behavior for the container?

AThe container is restarted by the kubelet.
BThe container is paused but not restarted.
CThe pod is deleted and recreated by the scheduler.
DNothing happens; the container continues running.
Attempts:
2 left
💡 Hint

Think about how Kubernetes ensures containers stay healthy.

💻 Command Output
intermediate
2:00remaining
Output of 'kubectl describe pod' after readiness probe failure

You run kubectl describe pod myapp and see the readiness probe failing repeatedly. What status will the pod show in the output?

APod status will be <strong>Succeeded</strong>.
BPod status will be <strong>CrashLoopBackOff</strong>.
CPod status will be <strong>Pending</strong>.
DPod status will be <strong>Running</strong> but <em>Ready</em> condition will be <strong>False</strong>.
Attempts:
2 left
💡 Hint

Readiness probes affect traffic routing but not pod lifecycle.

Troubleshoot
advanced
2:30remaining
Why does a container restart repeatedly despite a successful readiness probe?

A container restarts repeatedly, but its readiness probe always succeeds. What is the most likely cause?

AThe pod resource limits are too high.
BThe readiness probe failure causes restarts.
CThe liveness probe is failing, causing restarts.
DThe container image is missing.
Attempts:
2 left
💡 Hint

Readiness probes do not trigger restarts.

🔀 Workflow
advanced
3:00remaining
Order of events when a liveness probe fails repeatedly

Arrange the following Kubernetes events in the correct order when a liveness probe fails repeatedly:

A2,1,3,4
B1,2,3,4
C1,3,2,4
D3,1,2,4
Attempts:
2 left
💡 Hint

Think about how Kubernetes handles unhealthy containers step-by-step.

Best Practice
expert
3:00remaining
Choosing probe types to avoid unnecessary container restarts

You want to ensure your container restarts only when truly unhealthy, but you also want to control traffic routing carefully. Which probe configuration is best?

AUse a liveness probe that checks critical health and a readiness probe that checks service availability.
BUse only a readiness probe to control restarts and traffic.
CUse only a liveness probe for both restarts and traffic control.
DDisable both probes and rely on manual restarts.
Attempts:
2 left
💡 Hint

Consider the distinct roles of liveness and readiness probes.