<p>I am trying to understand the retry behavior for liveness probe, its not clear from <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes" rel="nofollow noreferrer">documentation</a>.</p>
<p>I will to illustrate with an example. Consider the following spec for liveness probe</p>
<pre><code>periodSeconds: 60
timeoutSeconds: 15
failureThreshold: 3
</code></pre>
<p>Lets assume the service is down</p>
<p>Which behavior is expected?</p>
<pre><code>the probe kicks off at 0s
sees a failure at 15s, (due to timeoutSeconds 15) 
retry1 at ~15s, fail at ~30s and retry2 at ~30s, fail at ~45 (retry immediately after failure)
ultimately restart pod at ~45s (due to failureThreshold 3)
</code></pre>
<p>or</p>
<pre><code>the probe kicks off at 0s
sees a failure at 15s, (due to timeoutSeconds 15) 
retry1 at ~60s, fail at ~75s and retry2 at ~120s, fail at ~135s (due to periodSeconds 60, doesnt really do retry after a failure)
ultimately restart pod at ~180s (due to failureThreshold 3)
</code></pre>

Aditya Dara
<p><code>periodSeconds</code> is how often it checks. If you mean retry after crossing the failure threshold it never will because the container is full restarted from scratch.</p>
