Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Node Autoscaler #81

Closed
MatthiasLohr opened this issue Aug 25, 2020 · 8 comments
Closed

Feature Request: Node Autoscaler #81

MatthiasLohr opened this issue Aug 25, 2020 · 8 comments
Labels

Comments

@MatthiasLohr
Copy link

With this ticket, I want to suggest to support Node Autoscaling with the hcloud-cloud-controller-manager.

When a Kubernetes cluster runs out of resources (CPU, RAM), new nodes need to be added. It would be awesome if this could be done automatically instead of manually.

hcloud-cloud-controller-manager already supports removing deleted nodes from the Kubernetes cluster, why not supporting also adding nodes, maybe even automatically. Yes, this might be more work compared to removing nodes, but I think all fundamental requirements are already here. hcloud-cloud-controller-manager already has access to the API and therefore can create new servers. Somehow, it's needed to define

  • Region
  • Operating System
  • Machine Type
  • SSH Keys
  • Name/Name Template

These parameters could be provided by annotations or a ConfigMap to the hcloud-cloud-controller-manager.

Network ID is already provided to the controller (if there is any configured). cloud-init configuration could be used for directly joining the cluster after the new machine is up.

Any thoughts about this?

Best regards
Matthias

@malikkirchner
Copy link

This would be greatly appreciated!

@codeagencybe
Copy link

I think you can already do this with HPA (Horizontal Pod Autoscaler).
Depending on the metrics you set, it will scale up/down your nodes.

If you have the Hetzner node drivers installed, then the feature is possible to have auto scaling nodes already.

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

This driver can be used with Rancher as example
https://github.com/mxschmitt/ui-driver-hetzner

@niklaskorz
Copy link
Contributor

We (@alugha) have implemented the cloudprovider interface of https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler for Hetzner and have been successfully using it for autoscaling on Hetzner Cloud since April. It still has to be adapted to Kubernetes 1.19 (currently using 1.17) but afterwards I see no reason why this couldn't be proposed upstream to be merged into the cluster-autoscaler.
If there's interest, I can publish our current fork of autoscaler here on Github as well before working on a proper pull request.

@MatthiasLohr
Copy link
Author

I'm always a friend of Open Source, so why not providing it to the public anyways? 😄

@identw
Copy link

identw commented Aug 27, 2020

I also implemented hetnzer support for autoscaling the cluster. There was no time for a pull request yet, but you can try it https://github.com/identw/autoscaler/tree/hetzner/cluster-autoscaler/cloudprovider/hetzner.
I am new to golang so my code may not be very pretty, however I am using my cluster autoscaler in my clusters, works fine.

@github-actions
Copy link
Contributor

This issue has been marked as stale because it has not had recent activity. The bot will close the issue if no further action occurs.

@github-actions github-actions bot added the stale label Sep 26, 2020
@LKaemmerling
Copy link
Member

Auto-Scaling is unfortunately out of the scope of a Cloud Controller Manager (https://github.com/kubernetes/cloud-provider/blob/master/cloud.go).

@Bessonov
Copy link

There is also a pull request: kubernetes/autoscaler#3640

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants