autoscaler
autoscaler copied to clipboard
Clarification of CA Rancher Provider capabilities
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 exampleclusterName: rancher-server-clusterorclusterName: rke2-cluster.
Describe any alternative solutions you've considered.:
Additional context.:
/area provider/rancher /area cluster-autoscaler
cc @ctrox (PTAL!)
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.
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.
Hi @jDmacD, if your concern is resolved, so can we close this issue?
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?
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?
IMO, it would be helpful for users to have more examples of how we can use CA with Rancher RKE2.
you can propose a PR if you have any examples like that.
Let's wait for others opinion.
cc @ctrox WDYT?
@diegonayalazo already opened a PR that improves the example config (#7266), I just created #7405 to address what the issue originally asked about. Other than that I'm not sure what else can be done as there aren't really any other config options and the few fields that we have should hopefully be clear after these PRs are merged.
Hi @ctrox, Thanks for the above information, I thought @diegonayalazo was asking for adding example (another than the existing) for Rancher RKE2.