C. startupProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 5
D. startupProbe:
httpGet:
path: /status
port: 80
successThreshold: 3
Solution
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.
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.
Hint: Longer failureThreshold and periodSeconds prevent early restarts [OK]
Common Mistakes:
Removing startupProbe loses slow start protection
Confusing startupProbe with readinessProbe
Setting initialDelaySeconds on livenessProbe doesn't fix startup timing
5. You have a slow-starting app that takes about 3 minutes to initialize. How should you configure the startupProbe to avoid premature pod restarts?
hard
A. Set failureThreshold to 18 and periodSeconds to 10
B. Set failureThreshold to 3 and periodSeconds to 30
C. Set failureThreshold to 1 and periodSeconds to 100
D. Disable startupProbe and rely on livenessProbe with initialDelaySeconds 180
Solution
Step 1: Calculate total startupProbe timeout needed
App needs 3 minutes (180 seconds) to start. Total timeout = failureThreshold x periodSeconds.
Step 2: Choose values matching 180 seconds
Set failureThreshold to 18 and periodSeconds to 10: 18 x 10 = 180 seconds, allowing full startup time before restart.
Step 3: Evaluate other options
Set failureThreshold to 1 and periodSeconds to 100: failureThreshold to 1 and periodSeconds to 100 = 100 seconds (too short). Set failureThreshold to 3 and periodSeconds to 30: 3 x 30 = 90 seconds (too short). Disable startupProbe and rely on livenessProbe with initialDelaySeconds 180 disables startupProbe, risking premature restarts from livenessProbe.
Final Answer:
Set failureThreshold to 18 and periodSeconds to 10 -> Option A
Quick Check:
failureThreshold x periodSeconds = startup timeout [OK]
Hint: Multiply failureThreshold by periodSeconds to match startup time [OK]
Common Mistakes:
Configuring insufficient total timeout (failureThreshold x periodSeconds < 180s)
Disabling startupProbe causing premature restarts
Setting only initialDelaySeconds without startupProbe
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.