Hi, guys,
According to the autoscaler document, it should be run on GCE, GKE, Azure or AWS cluster. I am just wondering whether it can run on our own k8s cluster in our private cloud.
Thanks!
Hi @tjliupeng,
I guess you'd need to provide your own implementation of the CloudProvider interface as I suspect that your private cloud does match any of the existing implementations.
@kgolab , what do you mean "provide your own implementation of the CloudProvider interface"?
Cluster Autoscaler adds or removes nodes from the cluster by creating or deleting VMs. To separate the autoscaling logic (the same for all clouds) from the API calls required to execute it (different for each cloud), the latter are hidden behind an interface. Each supported cloud has its own implementation of it, and --cloud-provider flag determines which one will be used. All code related to this can be found here: https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler/cloudprovider
To add support for your private cloud:
There are a couple things to consider before you even get started:
Thanks for the detail explanation, @aleksandra-malinowska
@aleksandra-malinowska
I am looking to use Autoscaler with private cloud like OpenStack (not OpenStack Magnum).
Is node groups concept mandatory with custom provider?
It is. All that CA is doing to scale-up is pick the best node group to scale-up and change its desired size. It expects the node group will be able to start the VM and configure it so that the VM will be able to join the cluster (ie. all CA does is make the decision to resize a particular node group, it doesn't actually create nodes).
Most helpful comment
Cluster Autoscaler adds or removes nodes from the cluster by creating or deleting VMs. To separate the autoscaling logic (the same for all clouds) from the API calls required to execute it (different for each cloud), the latter are hidden behind an interface. Each supported cloud has its own implementation of it, and
--cloud-providerflag determines which one will be used. All code related to this can be found here: https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler/cloudproviderTo add support for your private cloud:
There are a couple things to consider before you even get started: