<p>I have a kubernetes cluster that is setup using kops on AWS.</p>
<p>I don't need this cluster during weekends.</p>
<p>So I close it by setting its auto-scaling group's minimum and maximum capacity to 0 on Friday.</p>
<p>The problem with this method is that the startup order of the pods is not fixed.</p>
<p>I mean when I opens the cluster on Monday, sometimes pod A starts before pod B, sometimes pod B starts before pod A.</p>
<p>Is it possible to set the startup order of the pods in this situation?</p>

Brian
<p>In short, no. You can use <a href="https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#effect-of-pod-priority-on-scheduling-order" rel="nofollow noreferrer">pod priority</a> to influence the scheduling order of Pods. But most likely both Pod A and Pod B will schedule closely after each other given capacity. Then factors like image download time and image startup time will determine when a Pod actually starts.</p>
<p>If you need e.g a database to be available before its clients, you can use <a href="https://kubernetes.io/docs/concepts/workloads/pods/init-containers/" rel="nofollow noreferrer">init containers</a> to make the main container wait on a certain condition before starting.</p>
