<p>For example, say I have a pod that performs a GET request for its liveness probe with a timeout of 5 seconds and a period of 10 seconds. Which of these timelines represents the timing of the probe?</p>
<p>The since-last-probe pattern:</p>
<pre><code>0s: liveness probe initiated
5s: liveness probe times out
10s: liveness probe initiated again because 10 seconds have elapsed since the start of the last probe
</code></pre>
<p>Or the since-timeout pattern:</p>
<pre><code>0s: liveness probe initiated
5s: liveness probe times out
15s: 10 seconds have elapsed since the timeout occurred, so the probe fires again
</code></pre>
<p>In the former there will always be 10 seconds between probes, but in the latter there could be anywhere from 10 to 15 seconds between probes depending on how quickly the request returns. Which method does Kubernetes use?</p>

ssb
<p>Kubernetes <code>livenessProbe</code> works like this:</p>
<ul>
<li><code>periodSeconds</code> is calculated from the time when the last probe was sent</li>
<li>there are never two probes running at the same time, if the probe is not timed-out yet, a new probe waits</li>
</ul>
<p>So, in your case (<code>timeoutSeconds=5</code>, <code>periodSeconds=10</code>), the probes will look as follows:</p>
<pre><code>0s: liveness probe initiated
5s: liveness probe times out
10s: liveness probe initiated again because 10 seconds have elapsed since the start of the last probe
</code></pre>
<p>If you had the opposite (<code>timeoutSeconds=10</code>, <code>periodSeconds=5</code>), then the probes would look as follows:</p>
<pre><code>0s: liveness probe initiated
10s: liveness probe times out
10s: liveness probe initiated again
</code></pre>
