<p>In the Google documentation there is the following example:</p>
<p><a href="https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-autoscaler#autoscaling_limits" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-autoscaler#autoscaling_limits</a></p>
<p>Autoscaling limits</p>
<p>You can set the minimum and maximum number of nodes for the cluster autoscaler to use when scaling a node pool. Use the <code>--min-nodes</code> and <code>--max-nodes</code> flags to set the minimum and maximum number of nodes per zone</p>
<p>Starting in GKE version 1.24, you can use the <code>--total-min-nodes</code> and <code>--total-max-nodes</code> flags for new clusters. These flags set the minimum and maximum number of the total number of nodes in the node pool across all zones.</p>
<p><strong>Min and max nodes example</strong></p>
<p>The following command creates an autoscaling multi-zonal cluster with six nodes across three zones initially, with a minimum of one node per zone and a maximum of four nodes per zone:</p>
<pre><code>gcloud container clusters create example-cluster \
    --num-nodes=2 \
    --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>In this example, the total size of the cluster can be between three and twelve nodes, spread across the three zones. If one of the zones fails, the total size of the cluster can be between two and eight nodes.</p>
<p>So my question is:</p>
<p>What is the effect of setting <code>--num-nodes=2</code> in this example? Does it matter if I set <code>--num-nodes=1</code> or <code>--num-nodes=3</code>?</p>

Johan1us
<p><code>--num-nodes=2</code> represents the number of virtual machine in your kubernetes cluster, setting it to 1 or 3 nodes will matter depending on what will be the usage of your application on your kubernetes cluster, also from the example above <code>--enable-autoscaling --min-nodes=1 --max-nodes=4</code> you can change the value of the nodes depending on the behavior of your application if it will be needing more resource.</p>
