Home > OS >  Cluster Autoscaler on Baremetal kubernetes
Cluster Autoscaler on Baremetal kubernetes

Time:07-13

Is it possible to attach Cluster Autoscaler (CA) on baremetal kubernetes cluster? (want to scale in/out via AWS EC2)

I did checked https://github.com/kubernetes/autoscaler/issues/1060 document but I couldn't find the answer I wanted.

logically, it seems possible but I am not sure I can use this feature.

CodePudding user response:

This is a little bit complicated for the simple reason that your typical cloud based k8s instances are virtual machines which are managed through a simple API. This allows k8s to easily integrate with cloud providers and manage autoscaling simply by issuing API calls to your provider.

With a bare metal setup it is tricky, since you need a way to be able to communicate with your bare metal nodes that is k8s native. Here is a complicated version of what your solution will look like.

Alternatively, what you can do is use the metal3 project. You will supply --cloud-provider cluster-api to your autoscaler( see this doc). You will then run cluster-api-provider-m3 in your cluster, along with baremetal-operator. This will allow you to manage your bare metal instances as k8s objects, which are manipulated using the cluster-api provider, which is what your autoscaler will engage with.

Here's some information on metal3 project. Here is a guide on how to get started with metal3.

If you plan to use an Amazon service like EKS and want to scale based on your on-premise k8s nodes, you will need a specialized EKS offering like EKS Anywhere which is very expensive.

  • Related