0
0
Kubernetesdevops~20 mins

Readiness probe concept in Kubernetes - Practice Problems & Coding Challenges

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

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

ATo check if the container is alive and restart it if it is not
BTo determine if the container is ready to accept traffic
CTo monitor resource usage like CPU and memory inside the container
DTo automatically scale the number of pods based on load
Attempts:
2 left
💡 Hint

Think about when Kubernetes should send traffic to a pod.

💻 Command Output
intermediate
1:30remaining
Readiness Probe Failure Effect

Given a pod with a readiness probe that fails continuously, what will be the state of the pod in the Kubernetes service endpoints?

AThe pod will be removed from the service endpoints and not receive traffic
BThe pod will be restarted automatically by Kubernetes
CThe pod will be deleted from the cluster
DThe pod will remain in the service endpoints and receive traffic
Attempts:
2 left
💡 Hint

Consider what happens when a pod is not ready but still running.

Configuration
advanced
2:00remaining
Correct Readiness Probe Configuration

Which of the following YAML snippets correctly configures a readiness probe that checks HTTP path /health on port 8080 every 10 seconds with a timeout of 5 seconds?

A
readinessProbe:
  httpGet:
    path: /health
    port: 8080
  initialDelaySeconds: 5
  periodSeconds: 10
  timeoutSeconds: 5
B
readinessProbe:
  httpGet:
    path: /health
    port: 8080
  periodSeconds: 5
  timeoutSeconds: 10
C
readinessProbe:
  exec:
    command: ["curl", "-f", "http://localhost:8080/health"]
  periodSeconds: 10
  timeoutSeconds: 5
D
readinessProbe:
  tcpSocket:
    port: 8080
  periodSeconds: 10
  timeoutSeconds: 5
Attempts:
2 left
💡 Hint

Look for the HTTP GET method with correct timing settings.

Troubleshoot
advanced
2:00remaining
Troubleshooting Readiness Probe Failures

A pod's readiness probe is failing, but the container is running fine. Which of the following is the most likely cause?

AThe pod has insufficient CPU resources
BThe container is crashing and restarting frequently
CThe readiness probe path or port is incorrect or the service inside the container is not responding
DThe pod's liveness probe is misconfigured
Attempts:
2 left
💡 Hint

Think about what the readiness probe checks specifically.

🔀 Workflow
expert
2:30remaining
Readiness Probe Impact on Rolling Updates

During a rolling update, how does a failing readiness probe affect the deployment rollout process?

AKubernetes immediately rolls back the update if any pod fails its readiness probe
BPods failing readiness probes are restarted repeatedly until they pass, blocking rollout progress
CKubernetes pauses the rollout indefinitely until all pods pass readiness probes
DPods failing readiness probes are not added to the service endpoints, so traffic is not sent to them, but rollout continues until maxUnavailable is reached
Attempts:
2 left
💡 Hint

Consider how Kubernetes balances availability and rollout progress.