Bird
0
0

What is wrong with this liveness probe configuration?

medium📝 Debug Q7 of 15
Kubernetes - Health Checks and Probes
What is wrong with this liveness probe configuration?
livenessProbe:
  tcpSocket:
    port: "eighty"
  initialDelaySeconds: 5
AtcpSocket probe does not support port specification
BinitialDelaySeconds cannot be less than 10
CThe port value should be an integer, not a string
DThe livenessProbe must use httpGet instead of tcpSocket
Step-by-Step Solution
Solution:
  1. Step 1: Check port type

    The port field in tcpSocket must be an integer or named port, not a string representing a word.
  2. Step 2: Validate other fields

    initialDelaySeconds can be any non-negative integer; 5 is valid.
  3. Step 3: Confirm tcpSocket usage

    tcpSocket supports port specification; httpGet is not mandatory.
  4. Final Answer:

    The port value should be an integer, not a string -> Option C
  5. Quick Check:

    Port must be integer or named port, not string [OK]
Quick Trick: Port must be integer or named port, not string [OK]
Common Mistakes:
  • Using string instead of integer for port
  • Assuming initialDelaySeconds minimum is 10
  • Thinking tcpSocket cannot specify port

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes