Container recreation replaces a terminated container by discarding it and creating a new one. Kubernetes commonly calls this process a container restart, but the original container is not reused. Files written to its filesystem disappear, while other containers in the pod continue running. section 6.2.1
A pod-level restart policy controls when recreation occurs:
- Never does not recreate it, even after failure. The policy applies to every container in the pod. section 6.2.1
Observe a recreated container
Watch the pod, terminate the Envoy container, and observe readiness change before recovery: kubectl get po -w; curl -X POST http://localhost:9901/quitquitquit. The RESTARTS count increases, and events report that the container was created and started again. Repeated failures can produce CrashLoopBackOff through increasing restart delays.
