<p>I have a GKE cluster that I want to have sitting at 0 nodes, scale up to 3 nodes to perform a task, and then after a certain amount of idle time, scale back down to 0. Is there a way to do this?</p>

Cam
<p>Yes, you can scale down pools after some idle condition.</p>
<p>You can use <strong>G-Cloud</strong> cli to scale up and scale down node pool.</p>
<p><strong>Resize GKE pool using cloud function</strong> :</p>
<p>You can also use <strong>Cloud function</strong> to trigger API calls and use <strong>cloud scheduler</strong> to trigger that function at a specific time.</p>
<p><strong>OR</strong></p>
<p>You can write Cloud function with PubSub as a trigger as pass message to PubSub based on that you can resize the GKE node pool as per requirement.</p>
<p>Example if anyone looking for : <a href="https://github.com/harsh4870/cloud-function-scale-gke" rel="nofollow noreferrer">https://github.com/harsh4870/cloud-function-scale-gke</a></p>
