delay container startup or define container/service dependency

1,747 views
Skip to first unread message

Yong Zhang

unread,
Sep 1, 2017, 10:32:46 AM9/1/17
to Kubernetes user discussion and Q&A
Hi, all

I have one pod with two containers e.g. A and B, 
A should start after B because it relies on service B.

I can't find any solution to make container A delay startup, is there any workaround or best practices on Kubernetes for this scenario?  Thanks.

Matthias Rampke

unread,
Sep 1, 2017, 10:44:48 AM9/1/17
to Kubernetes user discussion and Q&A

There's not really a way to express that dependency. You can make the second container wait in a wrapper script, or just let it crash and get restarted until it can successfully start.

/MR


--
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-use...@googlegroups.com.
To post to this group, send email to kubernet...@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.

David Oppenheimer

unread,
Sep 4, 2017, 2:59:10 AM9/4/17
to Kubernetes user discussion and Q&A

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.

Tim Hockin

unread,
Sep 4, 2017, 12:16:42 PM9/4/17
to Kubernetes user discussion and Q&A
What happens if B crashes and restarts?  Or hiccups and just stops responding for a couple seconds? You have to handle that anyway, so ordering is irrelevant.

--
Reply all
Reply to author
Forward
0 new messages