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

Clarification of CA Rancher Provider capabilities #7148

Open
jDmacD opened this issue Aug 8, 2024 · 6 comments
Open

Clarification of CA Rancher Provider capabilities #7148

jDmacD opened this issue Aug 8, 2024 · 6 comments
Labels
area/cluster-autoscaler area/provider/rancher kind/feature Categorizes issue or PR as related to a new feature.

Comments

@jDmacD
Copy link

jDmacD commented Aug 8, 2024

Which component are you using?:

CA Rancher Provider

Is your feature request designed to solve a problem? If so describe the problem this feature should solve.:

The documentation for the Rancher Provider states, emphasis mine:

This cluster autoscaler for Rancher scales nodes in clusters which use RKE2 provisioning (Rancher v2.6+). It uses a combination of the Rancher API and the underlying cluster-api types of RKE2.

The cluster-autoscaler can be run inside the RKE2 cluster, on the Rancher server cluster or on a completely separate machine. To run it outside the RKE2 cluster, make sure to provide a kubeconfig with --kubeconfig.

My reading of this is that CA can be deployed to a Rancher server in order to scale RKE2 clusters that Rancher creates. But the example cloud-config implies that only a single RKE2 cluster can be targeted for scaling using clusterName and clusterNamespace

# rancher server credentials
url: https://rancher.example.org
token: <rancher token>
# name and namespace of the clusters.provisioning.cattle.io resource on the
# rancher server
clusterName: my-cluster
clusterNamespace: fleet-default
# optional, will be auto-discovered if not specified
#clusterAPIVersion: v1alpha4

There is no mention of any autodiscovery capabilities or configuration for the Rancher Provider, even though it seems to share some similarities to the CAPI Provider.

Describe the solution you'd like.:

  • Clarification in the documentation stating that either
    a. The Rancher Provider can only scale a single cluster
    b. The Rancher Provider can scale multiple clusters
    • Documentation on how this is achieved.
  • More specificity in the example cloud-config. For example clusterName: rancher-server-cluster or clusterName: rke2-cluster.

Describe any alternative solutions you've considered.:

Additional context.:

@jDmacD jDmacD added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 8, 2024
@jDmacD jDmacD changed the title Clarification of AC Rancher Provider capabilities Clarification of CA Rancher Provider capabilities Aug 8, 2024
@Shubham82
Copy link
Contributor

/area provider/rancher
/area cluster-autoscaler

@Shubham82
Copy link
Contributor

Shubham82 commented Aug 9, 2024

cc @ctrox (PTAL!)

@ctrox
Copy link
Contributor

ctrox commented Aug 13, 2024

My reading of this is that CA can be deployed to a Rancher server in order to scale RKE2 clusters that Rancher creates. But the example cloud-config implies that only a single RKE2 cluster can be targeted for scaling using clusterName and clusterNamespace

I think cluster-autoscaler in general does not support targeting multiple workload clusters with a single instance. The API for the different cloud-providers is limited in that it targets a single workload cluster.

There is no mention of any autodiscovery capabilities or configuration for the Rancher Provider, even though it seems to share some similarities to the CAPI Provider.

I agree that it could be made a bit more clear in the docs making it clear that only a single workload cluster can be targeted. The current cloud-config example states:

# name and namespace of the clusters.provisioning.cattle.io resource on the rancher server

The clusters.provisioning.cattle.io is the CRD Rancher uses to manage RKE2 clusters but yeah this might not be obvious to all Rancher users.

@jDmacD
Copy link
Author

jDmacD commented Aug 13, 2024

Awesome, thanks for the clarification @ctrox. Its a shame there is not more information on using the autoscaler in the Suse/Rancher docs. You would think this is something they would put front and center. I know they have an AWS example, it would be nice if they expanded the docs to cover the other platforms they support.

Thank you for creating and maintaining the Rancher Provider and answering my question.

@Shubham82
Copy link
Contributor

Hi @jDmacD, if your concern is resolved, so can we close this issue?

@diegonayalazo
Copy link

Hi everyone! Is it possible to have more examples on how to setup the RKE2 cluster in order for the autoscaler to work? How can I be of help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cluster-autoscaler area/provider/rancher kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

5 participants