does GKE autopilot auto scale both pods and nodes?

1/4/2022

when I change the replicas: x 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?

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?

-- Alex Skotner
google-kubernetes-engine
horizontal-pod-autoscaling
kubernetes

2 Answers

1/4/2022

GKE autopilot by default will not scale the replicas count beyond what you specified. This is the default behavior of Kubernetes in general.

If you want automatic autoscaling you have to use Horizental Pod Autoscaler (HPA) which is supported in Autopilot

If you deploy HPA to scale up and down your workload, Autopilot will scale up and down the nodes automatically and that's transparent for you as the nodes are managed by Google.

-- boredabdel
Source: StackOverflow

1/4/2022

GKE autoscale only Nodes by default, while you have to take care of your HPA deployment scaling.

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.

We need to configure both scaling options for deployment VPA and HPA.

Pre-configured: Autopilot handles all the scaling and configuring of your nodes.

Default: You configure Horizontal pod autoscaling (HPA) You configure Vertical Pod autoscaling (VPA)

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 & VPA auto-scaling.

You can read more about the options here : https://cloud.google.com/kubernetes-engine/docs/concepts/autopilot-overview#comparison

-- Harsh Manvar
Source: StackOverflow