kuberneteskubernetes-health-checkreadinessprobelivenessprobe

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.


Solution

  • 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

    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.