h q
h q

Reputation: 1500

Kubernetes Health Check: timeoutSeconds exceeds periodSeconds

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"?

Same question applies for when the Pod succeeds.

Upvotes: 8

Views: 5103

Answers (1)

Kamol Hasan
Kamol Hasan

Reputation: 13456

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.

Upvotes: 9

Related Questions