<p>I have a GKE cluster with n nodes (2 nodes with 1 CPU each in this example), running a stress test. I want them scaling without stopping running pods.</p>

<p>The cluster has autoscale enabled and a node pool with autoscale enabled.</p>

<p>After reaching about 50 pods the memory/CPU ends up, and the cluster starts creating a new node in a different node pool. Why not in the current pool?</p>

<p>After lanunching a new node the cluster crashes completely: </p>

<ul>
<li><p>no one node is running; </p></li>
<li><p>some nodes are unschedulable with these warnings: </p>

<p>"Cannot schedule pods: Insufficient memory."</p>

<p>"Cannot schedule pods: node(s) had taints that the pod didn't tolerate." (I didn't set any taint though) </p></li>
<li><p>others are in Pending state.</p></li>
</ul>

<p>What I want to achieve: </p>

<ul>
<li>keep existing pods running without crashing; </li>
<li>get the new pods created and kept in Pending state until the new node is created; </li>
<li>the new node is created in the node pool with the instance template I    have chosen.</li>
</ul>

Luca Carducci
<p>It sounds like the behavior you are seeing is part of the new <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-provisioning" rel="nofollow noreferrer">node auto provisioning</a> feature of the cluster autoscaler. It automatically manages a list of node pools on your behalf, which is why you are seeing a node pool created. </p>

<p>If you just want the existing node pool to scale up / down, you should disable node auto provisioning and just set the autoscaling parameters of your node pool (min / max number of nodes) to have the autoscaler add new nodes with the existing instance template. </p>
