<p>I am trying to run two Dockers on the same Kubernetes pod and I want one of the Docker container always to run before the other. I remember learning about specifying such dependency on the pod configuration file, but can not find that now. Kubernetes <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod" rel="noreferrer">documentation</a> does not explain it either. </p>

<p>Here is the example pod configuration with two containers I adopted from another <a href="https://stackoverflow.com/questions/25741479/how-to-write-a-kubernetes-pod-configuration-to-start-two-containers">Stackoverflow question</a>. How should I change this pod configuration to run container <code>type1</code> before <code>type2</code>?</p>

<pre><code>{
  "id": "podId",
  "desiredState": {
    "manifest": {
      "version": "v1beta1",
      "id": "podId",
      "containers": [{
        "name": "type1",
        "image": "local/image"
        },
        {
        "name": "type2",
        "image": "local/secondary"
        }]
    }
  },
  "labels": {
    "name": "imageTest"
  }
}
</code></pre>

<p>Thanks in advance,
Nodir.</p>

<p>Kubernetes currently does not allow specification of container startup dependencies.</p>

<p>There has been some discussion in GitHub issues <a href="https://github.com/GoogleCloudPlatform/kubernetes/issues/1996">1996</a> and <a href="https://github.com/GoogleCloudPlatform/kubernetes/issues/1589">1589</a> that might help you out.</p>
