<p>I'm new to Kubernetes and I was wondering if it is possible to have container replicas launching one at a time? In other words, if I deploy a compose file yielding a container or pod configuration with N replicas, is it possible (and if so how) to ensure that each replica waits for the previous one to be ready before launching? </p>

<p>I read about readiness probes, but if I understood them correctly, they ensure pod ordering instead of replica, or did I misunderstood? </p>

<p>Thanks</p>

João Matos
<p><a href="https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#deployment-and-scaling-guarantees" rel="nofollow noreferrer">A StatefulSet has this property</a>: given three replicas, the second one will not start until the first one is running and ready.</p>

<p>(Usually "replica" and "pod" mean the same thing.  If you create a Deployment or StatefulSet with 3 replicas, and run <code>kubectl get pods</code> once it's done, you should see 3 pods.)</p>

<p>If you're using Kompose to do the deployment, there's at least <a href="http://kompose.io/user-guide/#alternative-conversions" rel="nofollow noreferrer">a hint that it doesn't support StatefulSets</a>; you need to write native Kubernetes YAML for this.</p>
