<p>There are several microservices (of the order of 5 or more) and they need to be launched in a certain order.</p>
<p>Deployment can be Kubernetes (As an example).</p>
<p>Is it possible to specify the launch of applications in a certain order ?</p>
<p>At the same time, the launch of the next application should be initiated when the previous application reported a successful start ?</p>

skyho
<p>Kubernetes doesn't have a feature that lets you deploy something in &quot;order&quot;. However ArgoCD that manages the deployment of your applications can make this work with Sync Waves/Argo Hooks.</p>
<p>You could also just create a shell script that does this for you if you want an easy solution. You could include an init container that would check the previous applications health and then have it start.</p>
<p>Edit1:
You could add a init container that checks the pod/service of the previous &quot;application&quot; with:</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: myapp-pod
  labels:
    app.kubernetes.io/name: MyApp
spec:
  containers:
  - name: myapp-container
    image: busybox:1.28
    command: ['sh', '-c', 'echo The app is running! &amp;&amp; sleep 3600']
  initContainers:
  - name: init-myservice
    image: busybox:1.28
    command: ['sh', '-c', &quot;until nslookup myservice.$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local; do echo waiting for myservice; sleep 2; done&quot;]
  - name: init-mydb
    image: busybox:1.28
    command: ['sh', '-c', &quot;until nslookup mydb.$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local; do echo waiting for mydb; sleep 2; done&quot;]
</code></pre>
<p>If a Pod's init container fails, the kubelet repeatedly restarts that init container until it succeeds. This way you could &quot;wait&quot; before the preceeding application is startet until the previous application is running.</p>
