0
0
Kubernetesdevops~20 mins

HTTP probe configuration in Kubernetes - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
HTTP Probe Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
2:00remaining
What is the result of this HTTP readiness probe configuration?
Given this Kubernetes pod snippet, what will be the HTTP probe's behavior when the container is starting?
Kubernetes
readinessProbe:
  httpGet:
    path: /healthz
    port: 8080
  initialDelaySeconds: 5
  periodSeconds: 10
  failureThreshold: 3
AThe probe checks /healthz immediately on container start, then every 5 seconds; after 10 failures, it marks the pod as not ready.
BThe probe waits 5 seconds before first check, then checks /healthz every 10 seconds; after 3 failures, it marks the pod as not ready.
CThe probe waits 3 seconds before first check, then checks /healthz every 5 seconds; after 5 failures, it marks the pod as not ready.
DThe probe waits 10 seconds before first check, then checks /healthz every 3 seconds; after 1 failure, it marks the pod as not ready.
Attempts:
2 left
💡 Hint
Look at initialDelaySeconds, periodSeconds, and failureThreshold values carefully.
Configuration
intermediate
2:00remaining
Identify the correct HTTP liveness probe configuration for port 80 and path /status
Which option correctly configures a liveness probe that checks HTTP path /status on port 80 every 15 seconds with a timeout of 5 seconds?
A
livenessProbe:
  httpGet:
    path: /status
    port: 80
  periodSeconds: 15
  timeoutSeconds: 5
B
livenessProbe:
  httpGet:
    path: /status
    port: 8080
  periodSeconds: 15
  timeoutSeconds: 5
C
livenessProbe:
  httpGet:
    path: /health
    port: 80
  periodSeconds: 10
  timeoutSeconds: 5
D
livenessProbe:
  tcpSocket:
    port: 80
  periodSeconds: 15
  timeoutSeconds: 5
Attempts:
2 left
💡 Hint
Check the port number and path carefully; also probe type must be HTTP.
Troubleshoot
advanced
2:00remaining
Why does this HTTP readiness probe always fail?
A pod has this readiness probe: readinessProbe: httpGet: path: /ready port: 8080 initialDelaySeconds: 10 periodSeconds: 5 failureThreshold: 1 The container starts but the pod never becomes ready. What is the most likely cause?
AThe /ready endpoint is not responding with HTTP 200 status code, causing probe failures.
BThe failureThreshold is too high, so the pod never marks ready.
CThe initialDelaySeconds is too short, so the probe runs before container starts.
DThe port 8080 is incorrect; readiness probes do not support ports above 8000.
Attempts:
2 left
💡 Hint
Check what the probe expects from the HTTP endpoint.
🔀 Workflow
advanced
2:00remaining
Order the steps to add an HTTP liveness probe to a Kubernetes deployment
Put these steps in the correct order to add an HTTP liveness probe to a deployment YAML:
A3,1,2,4
B2,1,3,4
C1,3,2,4
D1,2,3,4
Attempts:
2 left
💡 Hint
Think about editing first, then applying, then verifying.
Best Practice
expert
3:00remaining
Which HTTP probe configuration best balances fast failure detection and avoiding false positives?
Choose the HTTP liveness probe configuration that best balances detecting real failures quickly without causing unnecessary container restarts.
AinitialDelaySeconds: 0, periodSeconds: 2, failureThreshold: 5, timeoutSeconds: 10
BinitialDelaySeconds: 5, periodSeconds: 5, failureThreshold: 1, timeoutSeconds: 1
CinitialDelaySeconds: 30, periodSeconds: 10, failureThreshold: 3, timeoutSeconds: 5
DinitialDelaySeconds: 60, periodSeconds: 60, failureThreshold: 1, timeoutSeconds: 1
Attempts:
2 left
💡 Hint
Consider initial delay, probe frequency, failure tolerance, and timeout together.