<p>I can automatically provision nodes in response to increased load either via <a href="https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-autoscaler" rel="nofollow noreferrer">Cluster Autoscaler</a>, which I can create a cluster with:</p>
<pre><code>gcloud container clusters create example-cluster \
  --num-nodes 1 \
  --zone us-central1-a \
  --node-locations us-central1-a,us-central1-b,us-central1-f \
  --enable-autoscaling --min-nodes 1 --max-nodes 4
</code></pre>
<p><a href="https://cloud.google.com/kubernetes-engine/docs/concepts/horizontalpodautoscaler" rel="nofollow noreferrer">Or via Horizontal Pod Autoscaling</a>, which I can apply to an existing cluster with:</p>
<pre><code>kubectl autoscale deployment &lt;deployment-name&gt; --min=1 --max=4
</code></pre>
<p><strong>What is the difference between Cluster Autoscaler and Horizontal Pod Autoscaling?</strong> They seem like alternate approaches to the same goal (having infrastructure adjust dynamically in response to greater resource needs). For example, both allow a minimum and maximum node count to be specified. Yet the documentation for each makes no reference to the other.</p>

Mario Ishac
<p><strong>Horizontal Pod autoscaler</strong>: Allow to update the numbers of replicas of a targeted deployment. Based on a metric you specify (eg: CPU...). This only affect the numbers of pods (not the numbers of nodes).</p>
<p><strong>Cluster autoscaler</strong>: Allow to add new nodes to a nodepool if pods are not schedulables due to a lack a ressources (eg: CPU, memory...). This only affect the numbers of nodes (not the numbers of pods).</p>
<p>(Note that you can use both at the same Time)</p>
