Bird
0
0

Identify the error in this liveness probe configuration: livenessProbe: exec: command: curl -f http://localhost/healthz initialDelaySeconds: 10 periodSeconds: 5

medium📝 Debug Q6 of 15
Kubernetes - Health Checks and Probes
Identify the error in this liveness probe configuration: livenessProbe: exec: command: curl -f http://localhost/healthz initialDelaySeconds: 10 periodSeconds: 5
Aexec probe cannot use curl command
BinitialDelaySeconds cannot be 10
CperiodSeconds must be greater than 10
DThe command should be an array of strings, not a single string
Step-by-Step Solution
Solution:
  1. Step 1: Check exec command syntax

    The exec command must be an array of strings, e.g., ["curl", "-f", "http://localhost/healthz"].
  2. Step 2: Validate other fields

    initialDelaySeconds and periodSeconds values are valid; exec probe can use curl if properly formatted.
  3. Final Answer:

    Command should be an array of strings, not a single string -> Option D
  4. Quick Check:

    Exec command requires string array [OK]
Quick Trick: Exec command must be array of strings [OK]
Common Mistakes:
  • Using single string instead of array for exec command
  • Incorrect assumptions about delay or period values
  • Thinking exec cannot run curl

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes