0
0
Kubernetesdevops~20 mins

Why probes keep applications healthy in Kubernetes - Challenge Your Understanding

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Probes Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Purpose of Kubernetes Readiness Probe

What is the main purpose of a readiness probe in Kubernetes?

ATo monitor the CPU and memory usage of the pod
BTo restart the container if it crashes or becomes unresponsive
CTo check if the application is ready to receive traffic and only then add it to the service endpoints
DTo update the container image automatically when a new version is available
Attempts:
2 left
💡 Hint

Think about when Kubernetes should send traffic to a pod.

💻 Command Output
intermediate
2:00remaining
Output of a Failing Liveness Probe

Given the following liveness probe configuration, what will Kubernetes do if the probe fails repeatedly?

Kubernetes
livenessProbe:
  httpGet:
    path: /healthz
    port: 8080
  initialDelaySeconds: 5
  periodSeconds: 10
  failureThreshold: 3
AKubernetes will delete the pod permanently
BKubernetes will stop sending traffic to the pod but will not restart it
CKubernetes will ignore the failures and keep the container running
DKubernetes will restart the container after 3 consecutive failures of the probe
Attempts:
2 left
💡 Hint

Remember what a liveness probe is designed to do.

🔀 Workflow
advanced
2:30remaining
Order of Probe Checks in Kubernetes

Arrange the following Kubernetes probe checks in the order they are typically performed during pod lifecycle:

A1,2,3,4
B2,1,4,3
C2,3,1,4
D3,2,1,4
Attempts:
2 left
💡 Hint

Think about what happens first when a pod starts and how traffic is routed.

Troubleshoot
advanced
2:00remaining
Troubleshooting a Pod Not Receiving Traffic

A pod is running but not receiving any traffic. The readiness probe is configured but the pod never becomes ready. What is the most likely cause?

AThe readiness probe is failing, so Kubernetes does not add the pod to service endpoints
BThe liveness probe is failing, causing the pod to restart repeatedly
CThe pod has insufficient CPU resources and is throttled
DThe container image is outdated and incompatible with the cluster
Attempts:
2 left
💡 Hint

Focus on what controls traffic routing to pods.

Best Practice
expert
2:30remaining
Best Practice for Using Startup Probes

Why is it recommended to use a startup probe for applications with long initialization times?

ATo prevent Kubernetes from killing the container prematurely before it finishes starting
BTo speed up the pod startup by skipping readiness checks
CTo automatically scale the number of pods based on startup time
DTo disable liveness and readiness probes during startup
Attempts:
2 left
💡 Hint

Think about what happens if liveness probes run too early on slow-starting apps.