Bird
0
0

Which of the following is the correct syntax to define a readiness probe in a Kubernetes pod spec?

easy📝 Conceptual Q12 of 15
Microservices - Orchestration with Kubernetes
Which of the following is the correct syntax to define a readiness probe in a Kubernetes pod spec?
AlivenessProbe: exec: command: ["cat", "/tmp/healthy"] timeoutSeconds: 1
BlivenessProbe: tcpSocket: port: 8080 initialDelaySeconds: 5 periodSeconds: 10
CreadinessProbe: httpGet: path: /healthz port: 8080 initialDelaySeconds: 5 periodSeconds: 10
DlivenessProbe: httpGet: path: /ready port: 8080 failureThreshold: 3
Step-by-Step Solution
Solution:
  1. Step 1: Identify readiness probe syntax

    Readiness probes often use httpGet with path and port, plus delay and period settings.
  2. Step 2: Confirm correct fields and indentation

    readinessProbe: httpGet: path: /healthz port: 8080 initialDelaySeconds: 5 periodSeconds: 10 correctly shows readinessProbe with httpGet, initialDelaySeconds, and periodSeconds.
  3. Final Answer:

    readinessProbe: httpGet: path: /healthz port: 8080 initialDelaySeconds: 5 periodSeconds: 10 -> Option C
  4. Quick Check:

    Readiness probe syntax = readinessProbe: httpGet: path: /healthz port: 8080 initialDelaySeconds: 5 periodSeconds: 10 [OK]
Quick Trick: Readiness uses httpGet with path and port in YAML [OK]
Common Mistakes:
MISTAKES
  • Mixing livenessProbe and readinessProbe fields
  • Incorrect indentation in YAML
  • Using wrong probe type for readiness

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes