Redoployment order

Looking for a solution, something that can be integrated in a YAML or automate that can solve the problem of redeploy workloads in an specific order:

1st DB
once started and running
2nd Configuration Service
once started and running
3rd Services
any particular order once started and running
4rd Front End
any particular order

Has anyone encountered this premise before? Any given help will be very much appreciatted

Hi Jmlp1,

have you ever checked out “cattlectl”? It’s a tool, which is developed by a colleague of mine and there is an ansible module available too, for status checking tasks via k8s module. Maybe it can solve your problem. You can find it on GitHub:


The “right” answer here is really not trying to do that in the first place, and that’s why there’s intentionally no support for this kind of dependency ordering in k8s (or similar systems, docker-compose on one machine had it but there is no distributed support for it in things like Swarm or our Cattle in 1.x).

Let’s assume you perfectly orchestrated deploying them in exactly the order you wanted… Now tomorrow the node(s) the DB is on die and it’s unavailable for a while until it gets rescheduled and started up (ignoring how the DB failing might involve manual steps and recovery from backups).

What do your tiers 2/3/4 do in the meantime? They have to do something reasonable so that the whole stack recovers… So they probably either wait for it to come back up, or crash and get rescheduled themselves.

But if you have that, then you don’t actually care what order they are deployed in anymore. Each tier will just wait (or crash and restart) until its dependencies are available.