Bird
0
0

Which of the following is the correct syntax snippet for a TCP readiness probe in a pod spec?

easy📝 Syntax Q3 of 15
Kubernetes - Health Checks and Probes
Which of the following is the correct syntax snippet for a TCP readiness probe in a pod spec?
AreadinessProbe: exec: command: ['curl', '-f', 'http://localhost:8080'] timeoutSeconds: 3
BreadinessProbe: httpGet: path: /health port: 8080 initialDelaySeconds: 5
CreadinessProbe: tcpSocket: path: /check periodSeconds: 10
DreadinessProbe: tcpSocket: port: 8080 initialDelaySeconds: 5 periodSeconds: 10
Step-by-Step Solution
Solution:
  1. Step 1: Identify TCP probe syntax

    TCP probe uses tcpSocket with port number, no path field.
  2. Step 2: Check options

    readinessProbe: tcpSocket: port: 8080 initialDelaySeconds: 5 periodSeconds: 10 correctly uses tcpSocket with port and timing fields.
  3. Final Answer:

    Correct TCP readiness probe syntax with tcpSocket and port -> Option D
  4. Quick Check:

    TCP probe syntax = tcpSocket with port [OK]
Quick Trick: TCP probes use tcpSocket with port, no path [OK]
Common Mistakes:
  • Using httpGet or exec instead of tcpSocket
  • Adding path field to tcpSocket
  • Omitting port number

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes