user1578872
user1578872

Reputation: 9118

Pod with restart policy never in Kubernetes

I have 2 containers in a pod. Main container and side car for sending logs to ELK.

I don't want the main container to restart when it fails, but I need the side car to get restarted automatically when it fails.

Setting RestartPolicy to Never is not restarting the side car also. Is there any way to set the restart policy at the container level?

Upvotes: 0

Views: 1331

Answers (1)

Tim Hockin
Tim Hockin

Reputation: 3662

We have a proposal to formalize sidecar container lifecycles: https://github.com/kubernetes/enhancements/blob/master/keps/sig-apps/sidecarcontainers.md

Take a look at that and see if it gets to what you need?

Upvotes: 1

Related Questions