0
0
Kubernetesdevops~10 mins

Probe timing parameters (initialDelay, period, timeout) in Kubernetes - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - Probe timing parameters (initialDelay, period, timeout)
Pod starts
Wait initialDelay seconds
Start first probe
Probe runs with timeout
Wait period seconds
Repeat probe
Back to Probe runs with timeout
This flow shows how Kubernetes waits before starting probes, runs them with a timeout, then repeats them periodically.
Execution Sample
Kubernetes
livenessProbe:
  initialDelaySeconds: 5
  periodSeconds: 10
  timeoutSeconds: 3
  httpGet:
    path: /health
    port: 8080
Defines a liveness probe that waits 5 seconds before first check, runs every 10 seconds, and times out after 3 seconds.
Process Table
StepTime (seconds)ActionProbe StateResult
10Pod startsNo probe yetWaiting initialDelay
25Initial delay endsStart first probeProbe sent
35-8Probe runningWaiting for responseSuccess if response before 3s timeout
48Probe finishedProbe successWait periodSeconds
518Start next probeProbe sentProbe running
618-21Probe runningWaiting for responseSuccess or failure
721Probe finishedProbe success/failureWait periodSeconds
831Start next probeProbe sentRepeat cycle
9............
ExitN/APod stopped or probe failedProbe stopsEnd of lifecycle or restart triggered
💡 Execution stops when pod stops or probe fails triggering restart
Status Tracker
VariableStartAfter Step 2After Step 4After Step 5After Step 7Final
Time (seconds)0581821N/A
Probe StateNo probeRunningSuccessRunningSuccess/FailureStopped or Restarted
Key Moments - 3 Insights
Why does Kubernetes wait before starting the first probe?
Kubernetes waits for initialDelaySeconds (see Step 2) to give the container time to start before checking health.
What happens if the probe does not respond within timeoutSeconds?
If the probe times out (no response within timeoutSeconds during Steps 3 or 6), Kubernetes treats it as a failure.
How often does Kubernetes run the probe after the first check?
After the first probe, Kubernetes waits periodSeconds (see Steps 4 and 7) before running the next probe.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution table, at what time does the first probe start?
A0 seconds
B5 seconds
C8 seconds
D10 seconds
💡 Hint
Check Step 2 in the execution_table where initialDelay ends and first probe starts.
At which step does Kubernetes wait for the probe response with a timeout?
AStep 1
BStep 5
CStep 3
DStep 8
💡 Hint
Look at Step 3 where probe runs and waits for response within timeoutSeconds.
If periodSeconds is changed from 10 to 5, how does the timing in the table change?
AProbes run every 5 seconds instead of 10 seconds
BInitial delay changes to 5 seconds
CTimeout changes to 5 seconds
DProbe runs only once
💡 Hint
PeriodSeconds controls how often probes repeat after initialDelay (see Steps 4 and 7).
Concept Snapshot
Probe Timing Parameters in Kubernetes:
- initialDelaySeconds: wait before first probe
- periodSeconds: interval between probes
- timeoutSeconds: max wait for probe response
Probes start after initialDelay, run with timeout, then repeat every periodSeconds.
Full Transcript
In Kubernetes, probes check container health. The initialDelaySeconds tells Kubernetes to wait before starting the first probe, allowing the container to initialize. After this delay, Kubernetes sends the probe and waits up to timeoutSeconds for a response. If the probe succeeds, Kubernetes waits periodSeconds before sending the next probe. This cycle repeats until the pod stops or a probe fails, which may trigger a restart. Understanding these timing parameters helps ensure probes run at the right times without false failures.