How can Mesos / Kubernetes / Azure be used to scale up and down available VMs? How can Mesos / Kubernetes / Azure be used to scale up and down available VMs? kubernetes kubernetes

How can Mesos / Kubernetes / Azure be used to scale up and down available VMs?


I don't know of an auto scaler for DCOS/MESOS in azure. Here is a github repository for making an auto scaler inside of an ACS kubernetes cluster though.https://github.com/wbuchwalter/Kubernetes-acs-autoscaler

As for how the code works. It is a tool built using the az cli to tell the ACS service to scale up and down nodes, using az acs scale command. Looking at the code it has aspirations to to drain all connections then pods from the node using kubectl, but it doens't appear to currently do so.


As I personally don't use Azure I can't give you a "production" insight, but as I understand Azure supports auto-scaling either via average CPU usage or message queue size. Refer to the docs for what is possible with Azure if you want to follow the "manual" way.

For the Mesos case, I think the CPU usage pattern could be utilized to automatically start new Mesos Slaves/Agents if certain limits are hit. As far as I know pure Mesos cannot start other VMs itself, which means auto-scaling has to be done via the cloud provider's interfaces.

If you want to use DCOS, there is a EAP for DCOS on Azure, which requires a signup. From what I understand, DCOS should be able to interact with the cloud provider's interfaces, meaning that it should be able to scale automatically.


Kubernetes doesn't really have auto-scaling yet but you could do it "manually" by monitoring the specific api's (number of requests per second) and have it call the specific Azure scale up/down api's.