Reputation: 1096
I have a pod with a sidecar. The sidecar does file synchronisation and is optional. However it seems that if the sidecar crashes, the whole pod becomes unavailable. I want the pod to continue serving requests even if its sidecar crashed. Is this doable?
Upvotes: 2
Views: 1971
Reputation: 13546
Set pod's restartPolicy
to Never
. It will prevent the kubelet
from restarting your pod even if one of your containers failed.
If a Pod is running and has two Containers. Container 1 exits with failure. If the
restartPolicy
it set toNever
, the kubelet will not restart Container and the Pod's phase stays Running.
Upvotes: 2