Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Autoscaling in Google Container Engine

I understand the Container Engine is currently on alpha and not yet complete.

From the docs I assume there is no auto-scaling of pods (e.g. depending on CPU load) yet, correct? I'd love to be able to configure a replication controller to automatically add pods (and VM instances) when the average CPU load reaches a defined threshold.

Is this somewhere on the near future roadmap?

Or is it possible to use the Compute Engine Autoscaler for this? (if so, how?)

like image 612
Daniel Avatar asked Nov 13 '14 01:11

Daniel


People also ask

What is auto scaling in Gcp?

Autoscaling. Compute Engine offers autoscaling to automatically add or remove VM instances from a managed instance group (MIG) based on increases or decreases in load. Autoscaling lets your apps gracefully handle increases in traffic, and it reduces cost when the need for resources is lower.

Does Kubernetes support autoscaling?

Autoscaling is one of the key features in Kubernetes cluster. It is a feature in which the cluster is capable of increasing the number of nodes as the demand for service response increases and decrease the number of nodes as the requirement decreases.

How autoscaling works in GKE?

GKE's cluster autoscaler automatically resizes the number of nodes in a given node pool, based on the demands of your workloads. You don't need to manually add or remove nodes or over-provision your node pools. Instead, you specify a minimum and maximum size for the node pool, and the rest is automatic.

How is autoscaling done in Kubernetes?

In Kubernetes, a HorizontalPodAutoscaler automatically updates a workload resource (such as a Deployment or StatefulSet), with the aim of automatically scaling the workload to match demand. Horizontal scaling means that the response to increased load is to deploy more Pods.


2 Answers

As we work towards a Beta release, we're definitely looking at integrating the Google Compute Engine AutoScaler.

There are actually two different kinds of scaling:

  1. Scaling up/down the number of worker nodes in the cluster depending on # of containers in the cluster
  2. Scaling pods up and down.

Since Kubernetes is an OSS project as well, we'd also like to add a Kubernetes native autoscaler that can scale replication controllers. It's definitely something that's on the roadmap. I expect we will actually have multiple autoscaler implementations, since it can be very application specific...

like image 68
brendan Avatar answered Oct 01 '22 01:10

brendan


Kubernetes autoscaling: http://kubernetes.io/docs/user-guide/horizontal-pod-autoscaling/

kubectl command: http://kubernetes.io/docs/user-guide/kubectl/kubectl_autoscale/

Example: kubectl autoscale deployment foo --min=2 --max=5 --cpu-percent=80

like image 43
Eyal Levin Avatar answered Oct 01 '22 03:10

Eyal Levin