<p>Liveness probes are supposed to trigger a restart of failed containers. Do they respect the default stateful set <a href="https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#deployment-and-scaling-guarantees" rel="nofollow noreferrer">deployment and scaling guarantees</a>. E.g. if the liveness probe fails at the same time for multiple pods within one and the same stateful set, would K8S attempt to restart one container at a time or all in parallel?</p>

<p>According to <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/" rel="noreferrer">https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/</a> the liveness probes are a feature implemented in the <code>kubelet</code>:</p>
<blockquote>
<p>The kubelet uses liveness probes to know when to restart a container.</p>
</blockquote>
<p>This means any decision about scheduling that requires knowledge of multiple pods is not taken into account.</p>
<p>Therefore if all your statefulset's pods have failing liveness probes at the same time they will be rescheduled at about the same time not respecting any deployment-level guarantees.</p>
