5

In Kubernetes Kubernetes Health Check Probes, what happens if timeoutSeconds exceeds periodSeconds? For example:

initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 10
successThreshold: 1
failureThreshold: 3

When will the Pod "fail"?

  • initialDelaySeconds + (periodSeconds * failureThreshold); or
  • initialDelaySeconds + ( MAX(periodSeconds,timeoutSeconds) * failureThreshold);

Same question applies for when the Pod succeeds.

h q
  • 1,168
  • 2
  • 10
  • 23

1 Answers1

6

There is a diagram in this blog post which illustrate your question clearly:

Probe Timeline

The pod will be restarted at lowest,

time = initialDelay + (failureThreshold - 1) * period + timeout

  • timeoutSeconds > periodSeconds ?

The probe call will be fired at a given interval independent of the previous probe response. The failureThreshold will be checked, once the probe call is passed or failed/timeout. But it is recommended to use periodSeconds greater than the timeoutSeconds.

Kamol Hasan
  • 12,218
  • 1
  • 37
  • 46