Container auto-restart keeps a Pod’s containers running while the Pod exists. When a container’s main process terminates, the Kubelet starts it again, allowing an application to recover without special application code. Other containers in the same Pod continue running when one container fails. section 6.2.1
Watching a failed container recover
Run kubectl get pods -w, then terminate the Envoy container through its administration endpoint with curl -X POST http://localhost:9901/quitquitquit. The Pod briefly changes from Running to NotReady, shows only one ready container, and returns to Running with RESTARTS increased to 1. Kubernetes records the restart through events. section 6.2.1
A liveness probe can also trigger a restart. Kubernetes waits until the probe reaches its failureThreshold; after three consecutive failures in the example, it stops and restarts Envoy. Repeated failures produce an exponential back-off and may appear as CrashLoopBackOff. section 6.2.4
