Bird
0
0

Which of the following is the correct syntax to define a startupProbe using an HTTP GET request in a pod spec?

easy📝 Configuration Q12 of 15
Kubernetes - Health Checks and Probes
Which of the following is the correct syntax to define a startupProbe using an HTTP GET request in a pod spec?
AstartupProbe: exec: command: ["curl", "-f", "http://localhost:8080/healthz"] timeoutSeconds: 5
BstartupProbe: httpGet: path: /healthz port: 8080 failureThreshold: 30 periodSeconds: 10
CstartupProbe: tcpSocket: port: 8080 initialDelaySeconds: 5
DstartupProbe: httpGet: path: /status port: 80 successThreshold: 3
Step-by-Step Solution
Solution:
  1. Step 1: Identify correct HTTP GET syntax for startupProbe

    The startupProbe uses httpGet with path and port fields, plus timing settings like failureThreshold and periodSeconds.
  2. Step 2: Compare options for correctness

    startupProbe: httpGet: path: /healthz port: 8080 failureThreshold: 30 periodSeconds: 10 correctly uses httpGet with path /healthz, port 8080, and timing fields. Other options use exec or tcpSocket or wrong ports/fields.
  3. Final Answer:

    startupProbe: httpGet: path: /healthz port: 8080 failureThreshold: 30 periodSeconds: 10 -> Option B
  4. Quick Check:

    startupProbe HTTP GET with path and port = A [OK]
Quick Trick: HTTP GET startupProbe needs path, port, failureThreshold [OK]
Common Mistakes:
  • Using exec probe syntax instead of httpGet
  • Missing failureThreshold or periodSeconds
  • Incorrect port or path values

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes