How to do auto scaling for Rancher and Kubernetes clusters on AWS EC2?

11/27/2017

Using AWS EC2 to install Rancher cluster. Then setup Kubernetes cluster from Rancher server.

About auto scaling, there are some ways to do:

Use Rancher cattle webhook service

https://rancher.com/docs/rancher/v1.6/en/cattle/webhook-service/

This way should use monitoring tool Prometheus to monitor CPU usage, then add or delete nodes due to alerting.

Use terraform to generate rancher-master-ha, rancher-nodes, networking, database dynamictly

http://rancher.com/aws-rancher-building-resilient-stack/

This can well done for Rancher cluster.

Horizontal Pod Autoscaling Walkthrough

https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/

It's official horizontal pod autoscaling way.

Kubernetes Autoscaler

https://github.com/kubernetes/autoscaler

It's also a official auto scaling way for Kubernets cluster.

Use AWS Auto Scaling

https://aws.amazon.com/autoscaling/

About this way, how to connect it to Rancher cluster and Kubernetes cluster running on EC2?


There are many ways to do the auto scaling, but which is the best way? And the very important thing is, how to use AWS Auto Scaling for this architecture?

-- online
amazon-web-services
autoscaling
cluster-computing
kubernetes
rancher

1 Answer

11/27/2017

Since you deployed Kubernetes with Rancher, you should use Rancher webhooks for this operation. Use Prometheus/Grafana to set up webhook when CPU utilization is over some %.

-- Dušan Šušić
Source: StackOverflow