<p>when pods scale it's almost instantinous (you delete pod, new one spawns) or when you setup HPA (HorizontalPodAutoscaling) with 50% cpu or other custom metric it just spawns new pods. The problem I have right now is even with enabled Node autoscaling on cluster they refuse to do so. Even when I set that I wanted 3nodes per zone (9total) it stays at 6, and with 1-5 or 3-5 autoscaling enabled pods are still throwing this error, any thoughts ? </p>

<pre><code>Warning  FailedScheduling   57s (x28 over 39m)     default-scheduler   0/6 nodes are available: 1 Insufficient memory, 5 node(s) didn't match node selector.

</code></pre>

<p><a href="https://i.stack.imgur.com/ESvEU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ESvEU.png" alt="enter image description here"></a></p>

potatopotato
<p>One possible reason could be that you're using a fixed <a href="https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector" rel="nofollow noreferrer">nodeSelector</a> for all pods. Take a look at the error message:</p>

<pre><code>... 5 node(s) didn't match node selector.
</code></pre>

<p>Out of 6 nodes, your pods are trying to be scheduled on a single node skipping the other 5 nodes. As you've enabled auto-scaling of nodes, maybe 6 nodes are enough to house all of your running resources that's why there are only 6 nodes.</p>

<p>I will suggest you use <a href="https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity" rel="nofollow noreferrer">Affinity and Anti-affinity</a> to distribute your pods over multiple zones instead of using fixed <code>nodeSlector</code>. </p>
