I have a pod which runs a single container. The pod is being run under a ReplicaSet (which starts a new pod to replace a pod that's terminated).

What I'm seeing is that when the container within that pod terminates, instead of the pod terminating too, the pod stays alive, and just restarts the container in it. However I'm thinking that what would make more sense would be for the entire pod to terminate in this situation, and then another would automatically start to replace it.

Does this seem sensible? If so, how would one accomplish this with k8s? Changing the restart policy setting doesn't seem to be an option. The restart policy (e.g. Restart=Always) seems to apply only to whether to restart a pod; the decision about whether to restart a container in a pod doesn't seem to be configurable. (At least not that I could see.)

Would appreciate any guidance anyone could offer here.

Thanks,

DR

--
You received this message because you are subscribed to the Google Groups "Kubernetes 
user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to kubernetes-users+unsubscr...@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.
  • [kubernetes-users]... David Rosenstrauch

Reply via email to