I want to know how I can start my deployments in a specific order. I am aware of initContainers
but that is not working for me. I have a huge platform with around 20 deployments and 5 statefulsets that each of them has their own service, environment variables, volumes, horizontal autoscaler, etc. So it is not possible (or I don't know how) to define them in another yaml deployment as initContainers
.
Is there another option to launch deployments in a specific order?
To create dependency among the deployment, there need to be sequence of certain condition true.
For example, Wait for the pod "busybox1" to contain the status condition of type "Ready".
kubectl wait --for=condition=Ready pod/busybox1
after than you can rollout the next deployment.
for further detail kubect-wait
Here is an another example from @Michael Hausenblas job-dependacies, having dependencies among the job objects
if you’d like to kick off another job after worker has completed? Here you go:
$ kubectl -n waitplayground \
wait --for=condition=complete --timeout=32s \
job/worker
job.batch/worker condition met
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加