<p>Is there some way to force pod creation order on Kubernetes?</p>
<p>I have a scenario where Kubernetes are selecting a node pool with few resources and the first pod to be deployed consume a very small resource, but the next one consumes a lot of resources and the deployment fails.</p>
<p>So I was wondering if there is a way to instruct Kubernetes to deploy first the pod that is resource hog then the small ones</p>

Rodrigo
<p>You can use <a href="https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector" rel="nofollow noreferrer">Node Selector</a> on your Pod’s specification, you just need <a href="https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#built-in-node-labels" rel="nofollow noreferrer">Node Labels</a> for that.</p>
<p>Another option is to use <a href="https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/" rel="nofollow noreferrer">Node Affinity</a>. You just need to have the <strong>Kubernetes cluster</strong>, and the K8s command line ready (<code>kubectl</code>). The steps for that are:</p>
<ul>
<li>Add a label to the node.</li>
<li>Schedule a Pod using required node affinity, or.</li>
<li>Schedule a Pod using preferred node affinity.</li>
</ul>
<p>Visit the official documentation I shared with you some lines above to have the detailed instructions, manifest examples, and the following URL for official K8’s documentation about <a href="https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/" rel="nofollow noreferrer">Assigning Pods to Nodes</a>.</p>
<p>Plus, you can also set up the Pod initialization in a specific order. See this <a href="https://stackoverflow.com/questions/56935239/how-to-configure-pod-initialization-in-a-specific-order-in-kubernetes">thread</a> for the proper instructions.</p>
