<p>when I change the <code>replicas: x</code> in my .yaml file I can see GKE autopilot boots pods up/down depending on the value, but what will happen if the load on my deployment gets too big. Will it then autoscale the number of pods and nodes to handle the traffic and then reduce back to the value specified in replicas when the request load is reduced again?</p>
<p>I'm basically asking how does autopilot horizontal autoscaling works?
and how do I get a minimum of 2 pod replicas that can horizontally autoscale in autopilot?</p>

<p>GKE autoscale only <strong>Nodes</strong> by default, while you have to take care of your HPA deployment scaling.</p>
<blockquote>
<p>Autopilot: GKE provisions and manages the cluster's underlying
infrastructure, including nodes and node pools, giving you an
optimized cluster with a hands-off experience.</p>
</blockquote>
<p>We need to configure both scaling options for deployment <strong>VPA</strong> and <strong>HPA</strong>.</p>
<blockquote>
<p>Pre-configured: Autopilot handles all the scaling and configuring of
your nodes.</p>
<p>Default: You configure Horizontal pod autoscaling (HPA) You configure
Vertical Pod autoscaling (VPA)</p>
</blockquote>
<p>GKE will manage the scaling up/down of your nodes in node pools, without worrying about the infrastructure you just have to start deploying the application with HPA &amp; VPA auto-scaling.</p>
<p>You can read more about the options here : <a href="https://cloud.google.com/kubernetes-engine/docs/concepts/autopilot-overview#comparison" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/concepts/autopilot-overview#comparison</a></p>
