GCE managed groups api for horizontally scaling kubernetes nodes

4/20/2016

i would like to scale kubernetes nodes according to unscheduled pods. if i have pods that can't be scheduled because of their resource requirements, i want to add a new node to the cluster.

looking at autoscaling feature of managed groups in GCE, this doesn't seem to be possible, as their model requires a metric per node in the cluster, while my metric is global.

  • can anyone confirm that this can't be achieved with current GCE solution?
  • anyone know of any existing tool/blogpost whatever that could help implementing a solution?
  • assuming i'm going to roll my own, i'm having problems finding an api that controls GCE managed groups (allows to add a node, remove a node)

thanks, Nathan

-- nathan g
google-api
google-compute-engine
kubernetes
scalability

1 Answer

4/20/2016

If you are fine with the standard per-node metrics, read the "Horizontal auto-scaling of nodes (GCE)" section of the kubernetes cluster management guide to enable to autoscaler.

If you want custom metrics, you can check out the GCE document.

There is also a similar question on stackoverflow, and the author of one of the answers said that after writing their own custom metrics, the standard per-node metrics was found to be just as good, if not better, for their use case.

-- Yu-Ju Hong
Source: StackOverflow