Does GKE supports vertical node auto-scaling?
For example:
I have a GKE cluster with only one node-pool and two nodes that node-pool, in case there is a requirement for more memory or CPU by any pod, I do not want any other nodes / compute instances to be created, is there a way in which the configuration of existing nodes change and extra memory / CPU get added?
Basically, existing instances / nodes get upgraded to become instances with higher configuration.
You could manually change node pools with different node types. AFAIK there is no vertical node auto scaler in GKE.
I'm afraid that Google Cloud does not provide feature you want.
There is no way to add CPU/RAM in current node pool VMs
as nodes used in Google Kubernetes Engine are based on Google Compute Engine Virtual Machines and resources are specified before creation. If you would like to change CPU/RAM resources in node pool
, you need to do it manually as @Emre Odabaş
pointed. However, all nodes must be recreated with higher resources availability.
To fulfill your needs you can choose which Machine Type you want to use, however you can create Custom Machine Type.
As workaround you could consider to have 2 node pools
:
one with regular node-pool-1
with e2-medium
(2 vCPU, 4GB Memory)
$ gcloud container node-pools create node-pool-1 --machine-type=e2-medium --cluster=cluster-1 --zone=europe-north1-b ---num-nodes=2
and node-pool-2
with e2-standard-4
(4 vCPU, 16 GB Memory).
$ gcloud container node-pools create node-pool-2 --machine-type=e2-standard-4 --cluster=cluster-1 --zone=europe-north1-b --num-nodes=0
However, this would work only when you would know that you do not have enough resources and change it manually:
node-pool-1
node-pool-1
and 1 node from node-pool-2
node-pool-2