<p>We have our application build on kubernetes. We are have many multi-containers pods.
We are facing challenges when as our many containers depends on each other to run application.
We first required database container to come up and then application container to run.
Is there is any equivalent solution to resolve this dependency where our database container will be up first then our application container??</p>

sayali_bhavsar
<p>There's no feature like that in Kubernetes because each application should be responsible for (re)connecting to their dependencies.</p>
<p>However, you can do a similar thing by using <a href="https://kubernetes.io/docs/concepts/workloads/pods/init-containers/" rel="nofollow noreferrer">initContainer</a> which can let other containers in the same pod not start until the initContainer exits with 0.</p>
<p>As <a href="https://kubernetes.io/docs/concepts/workloads/pods/init-containers/#init-containers-in-use" rel="nofollow noreferrer">the example</a> shows, if you run a simple shell script on a busybox that waits until it can connect to your application's dependencies, your applications will start after their dependencies can be connected.</p>
