{"id":28479,"date":"2023-10-31T12:30:08","date_gmt":"2023-10-31T11:30:08","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=28479"},"modified":"2024-06-10T11:45:17","modified_gmt":"2024-06-10T09:45:17","slug":"rancher-autoscaler-enable-rke2-node-autoscaling","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/rancher-autoscaler-enable-rke2-node-autoscaling\/","title":{"rendered":"Rancher autoscaler &#8211; Enable RKE2 node autoscaling"},"content":{"rendered":"\n<p>In Rancher, if you make use of node drivers to provision your RKE2 nodes, you can also make use of the cluster autoscaler. In this article, I will show you how simply you can configure the autoscaler for your cluster.<\/p>\n\n\n\n<p>Rancher official documentation: <a href=\"https:\/\/ranchermanager.docs.rancher.com\/\">Rancher<\/a><br>RKE2 official documentation: <a href=\"https:\/\/docs.rke2.io\/\">RKE2<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-cluster-autoscaler\">Cluster autoscaler<\/h2>\n\n\n\n<p>Cluster autoscaler is a tool that automatically adjusts the size of the Kubernetes cluster when one of the following conditions is true:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>There are pods that failed to run in the cluster due to insufficient resources.<\/li>\n\n\n\n<li>There are nodes in the cluster that have been underutilized for an extended period of time and their pods can be placed on other existing nodes.<\/li>\n<\/ul>\n\n\n\n<p>For more details: <a href=\"https:\/\/github.com\/kubernetes\/autoscaler\/tree\/master\/cluster-autoscaler\">https:\/\/github.com\/kubernetes\/autoscaler\/tree\/master\/cluster-autoscaler<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-get-started\">Get started<\/h2>\n\n\n\n<p>As stated previously, as long as you use node drivers for your RKE2 cluster, the cluster autoscaler should work. There are multiple cloud providers for Cluster Autoscaler, in our case, we will use Rancher.<\/p>\n\n\n\n<p>Cluster autoscaler will use the API of Rancher to adjust the size of the cluster.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-rke2-cluster\">RKE2 cluster<\/h2>\n\n\n\n<p>We will provision an RKE2 cluster with node drivers. We want at least two pools of machines, one for the control plane and another one for workers that will be autoscale automatically.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Control plane pool: 1 machine (control plane and etcd)<\/li>\n\n\n\n<li>Worker pool: 1 machine (worker)<\/li>\n<\/ul>\n\n\n\n<p>This section will show an example for AWS. <\/p>\n\n\n\n<p>Let&#8217;s start an RKE2 cluster on AWS with node drivers.<\/p>\n\n\n\n<p>For the IAM configuration, creation of access key, and cloud credentials, please follow the prerequisite provided by Rancher: <a href=\"https:\/\/ranchermanager.docs.rancher.com\/how-to-guides\/new-user-guides\/launch-kubernetes-with-rancher\/use-new-nodes-in-an-infra-provider\/create-an-amazon-ec2-cluster#prerequisites\">https:\/\/ranchermanager.docs.rancher.com\/how-to-guides\/new-user-guides\/launch-kubernetes-with-rancher\/use-new-nodes-in-an-infra-provider\/create-an-amazon-ec2-cluster#prerequisites<\/a><\/p>\n\n\n\n<p>Once you have a cloud credential for AWS, you can create the cluster as follows.<\/p>\n\n\n\n<p>Be sure to select RKE2.<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"560\" data-id=\"28485\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-node-provisioner-1024x560.png\" alt=\"\" class=\"wp-image-28485\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-node-provisioner-1024x560.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-node-provisioner-300x164.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-node-provisioner-768x420.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-node-provisioner-1536x840.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-node-provisioner-2048x1120.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/figure>\n\n\n\n<p>Create at least two pools, one for the control plane, and another one for the workers. Adapt the configuration (region, instance, VPC, etc.).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"453\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-aws-node-provisioner-1-1024x453.png\" alt=\"\" class=\"wp-image-28486\" style=\"width:841px;height:372px\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-aws-node-provisioner-1-1024x453.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-aws-node-provisioner-1-300x133.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-aws-node-provisioner-1-768x340.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-aws-node-provisioner-1-1536x680.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-aws-node-provisioner-1.png 1744w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"456\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-aws-node-provisioner-2-1024x456.png\" alt=\"\" class=\"wp-image-28487\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-aws-node-provisioner-2-1024x456.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-aws-node-provisioner-2-300x134.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-aws-node-provisioner-2-768x342.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-aws-node-provisioner-2-1536x684.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-aws-node-provisioner-2.png 1730w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Then setup the RKE2 configuration as you wish, for our demo, we are using a 1.26 version.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"430\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-aws-node-provisioner-3-1024x430.png\" alt=\"\" class=\"wp-image-28488\" style=\"width:840px;height:353px\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-aws-node-provisioner-3-1024x430.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-aws-node-provisioner-3-300x126.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-aws-node-provisioner-3-768x323.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-aws-node-provisioner-3-1536x645.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-aws-node-provisioner-3-2048x860.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"226\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-clusters-1024x226.png\" alt=\"\" class=\"wp-image-28489\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-clusters-1024x226.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-clusters-300x66.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-clusters-768x170.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-clusters-1536x340.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-clusters.png 1728w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Now that we have the following RKE2 cluster:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Control plane pool: 1 machine (control plane and etcd)<\/li>\n\n\n\n<li>Worker pool: 1 machine (worker)<\/li>\n<\/ul>\n\n\n\n<p>We will see how to install and configure the autoscaler.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-deployment-of-configuration\">Deployment of configuration<\/h2>\n\n\n\n<p>To enable the cluster autoscaler, we need to deploy it into the cluster with the correct configuration.<\/p>\n\n\n\n<p>First, we need to setup the service account and roles into the RKE2 cluster.<\/p>\n\n\n\n<p>Deploy the following:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: yaml; title: ; notranslate\" title=\"\">\n---\napiVersion: v1\nkind: ServiceAccount\nmetadata:\n  labels:\n    k8s-addon: cluster-autoscaler.addons.k8s.io\n    k8s-app: cluster-autoscaler\n  name: cluster-autoscaler\n  namespace: kube-system\n---\napiVersion: rbac.authorization.k8s.io\/v1\nkind: ClusterRole\nmetadata:\n  name: cluster-autoscaler\n  labels:\n    k8s-addon: cluster-autoscaler.addons.k8s.io\n    k8s-app: cluster-autoscaler\nrules:\n  - apiGroups: &#x5B;&quot;&quot;]\n    resources: &#x5B;&quot;events&quot;, &quot;endpoints&quot;]\n    verbs: &#x5B;&quot;create&quot;, &quot;patch&quot;]\n  - apiGroups: &#x5B;&quot;&quot;]\n    resources: &#x5B;&quot;pods\/eviction&quot;]\n    verbs: &#x5B;&quot;create&quot;]\n  - apiGroups: &#x5B;&quot;&quot;]\n    resources: &#x5B;&quot;pods\/status&quot;]\n    verbs: &#x5B;&quot;update&quot;]\n  - apiGroups: &#x5B;&quot;&quot;]\n    resources: &#x5B;&quot;endpoints&quot;]\n    resourceNames: &#x5B;&quot;cluster-autoscaler&quot;]\n    verbs: &#x5B;&quot;get&quot;, &quot;update&quot;]\n  - apiGroups: &#x5B;&quot;&quot;]\n    resources: &#x5B;&quot;nodes&quot;]\n    verbs: &#x5B;&quot;watch&quot;, &quot;list&quot;, &quot;get&quot;, &quot;update&quot;]\n  - apiGroups: &#x5B;&quot;&quot;]\n    resources:\n      - &quot;pods&quot;\n      - &quot;services&quot;\n      - &quot;replicationcontrollers&quot;\n      - &quot;persistentvolumeclaims&quot;\n      - &quot;persistentvolumes&quot;\n      - &quot;namespaces&quot;\n    verbs: &#x5B;&quot;watch&quot;, &quot;list&quot;, &quot;get&quot;]\n  - apiGroups: &#x5B;&quot;extensions&quot;]\n    resources: &#x5B;&quot;replicasets&quot;, &quot;daemonsets&quot;]\n    verbs: &#x5B;&quot;watch&quot;, &quot;list&quot;, &quot;get&quot;]\n  - apiGroups: &#x5B;&quot;policy&quot;]\n    resources: &#x5B;&quot;poddisruptionbudgets&quot;]\n    verbs: &#x5B;&quot;watch&quot;, &quot;list&quot;]\n  - apiGroups: &#x5B;&quot;apps&quot;]\n    resources: &#x5B;&quot;statefulsets&quot;, &quot;replicasets&quot;, &quot;daemonsets&quot;]\n    verbs: &#x5B;&quot;watch&quot;, &quot;list&quot;, &quot;get&quot;]\n  - apiGroups: &#x5B;&quot;storage.k8s.io&quot;]\n    resources: &#x5B;&quot;storageclasses&quot;, &quot;csinodes&quot;,&quot;csistoragecapacities&quot;,&quot;csidrivers&quot;]\n    verbs: &#x5B;&quot;watch&quot;, &quot;list&quot;, &quot;get&quot;]\n  - apiGroups: &#x5B;&quot;batch&quot;, &quot;extensions&quot;]\n    resources: &#x5B;&quot;jobs&quot;]\n    verbs: &#x5B;&quot;get&quot;, &quot;list&quot;, &quot;watch&quot;, &quot;patch&quot;]\n  - apiGroups: &#x5B;&quot;coordination.k8s.io&quot;]\n    resources: &#x5B;&quot;leases&quot;]\n    verbs: &#x5B;&quot;create&quot;]\n  - apiGroups: &#x5B;&quot;coordination.k8s.io&quot;]\n    resourceNames: &#x5B;&quot;cluster-autoscaler&quot;]\n    resources: &#x5B;&quot;leases&quot;]\n    verbs: &#x5B;&quot;get&quot;, &quot;update&quot;]\n---\napiVersion: rbac.authorization.k8s.io\/v1\nkind: Role\nmetadata:\n  name: cluster-autoscaler\n  namespace: kube-system\n  labels:\n    k8s-addon: cluster-autoscaler.addons.k8s.io\n    k8s-app: cluster-autoscaler\nrules:\n  - apiGroups: &#x5B;&quot;&quot;]\n    resources: &#x5B;&quot;configmaps&quot;]\n    verbs: &#x5B;&quot;create&quot;,&quot;list&quot;,&quot;watch&quot;]\n  - apiGroups: &#x5B;&quot;&quot;]\n    resources: &#x5B;&quot;configmaps&quot;]\n    resourceNames: &#x5B;&quot;cluster-autoscaler-status&quot;, &quot;cluster-autoscaler-priority-expander&quot;]\n    verbs: &#x5B;&quot;delete&quot;, &quot;get&quot;, &quot;update&quot;, &quot;watch&quot;]\n---\napiVersion: rbac.authorization.k8s.io\/v1\nkind: ClusterRoleBinding\nmetadata:\n  name: cluster-autoscaler\n  labels:\n    k8s-addon: cluster-autoscaler.addons.k8s.io\n    k8s-app: cluster-autoscaler\nroleRef:\n  apiGroup: rbac.authorization.k8s.io\n  kind: ClusterRole\n  name: cluster-autoscaler\nsubjects:\n  - kind: ServiceAccount\n    name: cluster-autoscaler\n    namespace: kube-system\n\n---\napiVersion: rbac.authorization.k8s.io\/v1\nkind: RoleBinding\nmetadata:\n  name: cluster-autoscaler\n  namespace: kube-system\n  labels:\n    k8s-addon: cluster-autoscaler.addons.k8s.io\n    k8s-app: cluster-autoscaler\nroleRef:\n  apiGroup: rbac.authorization.k8s.io\n  kind: Role\n  name: cluster-autoscaler\nsubjects:\n  - kind: ServiceAccount\n    name: cluster-autoscaler\n    namespace: kube-system\n\n<\/pre><\/div>\n\n\n<p>You can copy-paste and import it easily with the Rancher web interface.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"554\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-sa-1024x554.png\" alt=\"\" class=\"wp-image-28499\" style=\"width:841px;height:455px\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-sa-1024x554.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-sa-300x162.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-sa-768x416.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-sa-1536x831.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-sa-2048x1108.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"529\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-sa2-1024x529.png\" alt=\"\" class=\"wp-image-28500\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-sa2-1024x529.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-sa2-300x155.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-sa2-768x397.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-sa2-1536x794.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-sa2-2048x1058.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Then to allow the autoscaler to directly call Rancher and adjust the size of the cluster via API call, we will need to get the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Rancher URL<\/li>\n\n\n\n<li>Rancher token<\/li>\n\n\n\n<li>Cluster name<\/li>\n\n\n\n<li>Rancher CA certificate<\/li>\n<\/ul>\n\n\n\n<p>This information will be inserted into the following YAML.<\/p>\n\n\n\n<p>All those resources are needed to monitor and communicate with Rancher to scale the cluster.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: yaml; title: ; notranslate\" title=\"\">\n---\n  apiVersion: v1\n  kind: ConfigMap\n  metadata:\n    name: autoscaler-config\n    namespace: kube-system\n  data:\n    config.yaml: |\n      # rancher server credentials\n      url: &lt;rancher-url&gt;\n      token: &lt;rancher-token&gt;\n      # name and namespace of the clusters.provisioning.cattle.io resource on the\n      # rancher server\n      clusterName: &lt;cluster-name&gt;\n      clusterNamespace: fleet-default\n---\n  apiVersion: v1\n  data:\n    ca-certificates.crt: |\n      -----BEGIN CERTIFICATE-----\n      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n      -----END CERTIFICATE-----\n  kind: ConfigMap\n  metadata:\n    namespace: kube-system\n    name: rancher-ca\n---\n  apiVersion: apps\/v1\n  kind: Deployment\n  metadata:\n    name: cluster-autoscaler\n    namespace: kube-system\n    labels:\n      app: cluster-autoscaler\n  spec:\n    replicas: 1\n    selector:\n      matchLabels:\n        app: cluster-autoscaler\n    template:\n      metadata:\n        labels:\n          app: cluster-autoscaler\n        annotations:\n          prometheus.io\/scrape: &#039;true&#039;\n          prometheus.io\/port: &#039;8085&#039;\n      spec:\n        priorityClassName: system-cluster-critical\n        securityContext:\n          runAsNonRoot: true\n          runAsUser: 65534\n          fsGroup: 65534\n          seccompProfile:\n            type: RuntimeDefault\n        serviceAccountName: cluster-autoscaler\n        tolerations:\n          - effect: NoSchedule\n            operator: &quot;Exists&quot;\n            key: node-role.kubernetes.io\/control-plane\n          - effect: NoExecute\n            operator: &quot;Exists&quot;\n            key: node-role.kubernetes.io\/etcd\n        nodeSelector:\n          node-role.kubernetes.io\/control-plane: &#039;true&#039;\n        containers:\n          - image: registry.k8s.io\/autoscaling\/cluster-autoscaler:v1.26.1\n            name: cluster-autoscaler\n            resources:\n              limits:\n                cpu: 100m\n                memory: 600Mi\n              requests:\n                cpu: 100m\n                memory: 600Mi\n            command:\n              - .\/cluster-autoscaler\n              - --v=4\n              - --stderrthreshold=info\n              - --cloud-provider=rancher\n              - --cloud-config=\/mnt\/config.yaml\n              - --skip-nodes-with-local-storage=false\n            volumeMounts:\n              - name: ssl-certs\n                mountPath: \/etc\/ssl\/certs\n                readOnly: true\n              - name: autoscaler-config\n                mountPath: \/mnt\/config.yaml\n                subPath: config.yaml\n                readOnly: true\n            imagePullPolicy: &quot;Always&quot;\n            securityContext:\n              allowPrivilegeEscalation: false\n              capabilities:\n                drop:\n                  - ALL\n              readOnlyRootFilesystem: true\n        volumes:\n          - name: autoscaler-config\n            configMap:\n              name: autoscaler-config\n          - name: ssl-certs\n            configMap:\n              name: rancher-ca\n\n<\/pre><\/div>\n\n\n<p>Let&#8217;s first add the URL and name of the cluster. In my demo it will be &#8220;https:\/\/&lt;your-domain-name&gt;&#8221; and rke2-aws&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"360\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-29-1024x360.png\" alt=\"\" class=\"wp-image-29010\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-29-1024x360.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-29-300x105.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-29-768x270.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-29.png 1530w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Let&#8217;s get the CA certificate directly from the browser:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"554\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-30.png\" alt=\"\" class=\"wp-image-29012\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-30.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-30-300x162.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-30-768x416.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"252\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-31.png\" alt=\"\" class=\"wp-image-29013\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-31.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-31-300x74.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-31-768x189.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"564\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-32.png\" alt=\"\" class=\"wp-image-29014\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-32.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-32-300x165.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-32-768x423.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Copy the content of the file into the YAML.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"896\" height=\"1024\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-config2-896x1024.png\" alt=\"\" class=\"wp-image-28503\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-config2-896x1024.png 896w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-config2-262x300.png 262w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-config2-768x878.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-config2.png 1172w\" sizes=\"auto, (max-width: 896px) 100vw, 896px\" \/><\/figure>\n\n\n\n<p>Generate a token in Rancher. I am using the admin account and I select no scope.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"219\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-33.png\" alt=\"\" class=\"wp-image-29015\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-33.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-33-300x64.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-33-768x164.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"344\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-token-2-1024x344.png\" alt=\"\" class=\"wp-image-28508\" style=\"width:840px;height:282px\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-token-2-1024x344.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-token-2-300x101.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-token-2-768x258.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-token-2-1536x516.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-token-2-2048x689.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"356\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-token-3-1024x356.png\" alt=\"\" class=\"wp-image-28509\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-token-3-1024x356.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-token-3-300x104.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-token-3-768x267.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-token-3-1536x535.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-token-3-2048x713.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"418\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-34-1024x418.png\" alt=\"\" class=\"wp-image-29016\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-34-1024x418.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-34-300x122.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-34-768x313.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/image-34.png 1334w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Proceed to deploy the YAML file into the cluster.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"455\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-deploy-1024x455.png\" alt=\"\" class=\"wp-image-28511\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-deploy-1024x455.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-deploy-300x133.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-deploy-768x341.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-deploy-1536x683.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-autoscaler-deploy-2048x910.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Now there is a final step, to specify which pools to scale and the minimum and maximum node for those pools.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-enable-autoscaling-on-the-cluster\">Enable autoscaling on the cluster<\/h2>\n\n\n\n<p>Now that the resources are ready, the last step to enable the autoscaling on the cluster is to modify the YAML of the cluster.<\/p>\n\n\n\n<p>Find the machinePools to autoscale, add the following annotations, and save it.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: yaml; title: ; notranslate\" title=\"\">\nmachineDeploymentAnnotations:\n  cluster.provisioning.cattle.io\/autoscaler-min-size: &quot;1&quot;\n  cluster.provisioning.cattle.io\/autoscaler-max-size: &quot;3&quot;\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"462\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-cluster-yaml-1-2-1024x462.png\" alt=\"\" class=\"wp-image-28545\" style=\"object-fit:cover;width:839px;height:331px\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-cluster-yaml-1-2-1024x462.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-cluster-yaml-1-2-300x135.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-cluster-yaml-1-2-768x347.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-cluster-yaml-1-2-1536x693.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-cluster-yaml-1-2.png 1719w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"469\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-cluster-yaml-2-1024x469.jpg\" alt=\"\" class=\"wp-image-28546\" style=\"width:839px;height:358px\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-cluster-yaml-2-1024x469.jpg 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-cluster-yaml-2-300x137.jpg 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-cluster-yaml-2-768x352.jpg 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-cluster-yaml-2-1536x704.jpg 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-cluster-yaml-2.jpg 1726w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"415\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-cluster-yaml-3-2-1024x415.png\" alt=\"\" class=\"wp-image-28547\" style=\"width:839px;height:287px\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-cluster-yaml-3-2-1024x415.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-cluster-yaml-3-2-300x122.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-cluster-yaml-3-2-768x311.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-cluster-yaml-3-2-1536x622.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-cluster-yaml-3-2.png 1725w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-testing\">Testing<\/h2>\n\n\n\n<p>Our current cluster has two machines.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"212\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-1-1-1024x212.png\" alt=\"\" class=\"wp-image-28516\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-1-1-1024x212.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-1-1-300x62.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-1-1-768x159.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-1-1-1536x318.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-1-1-2048x424.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Let&#8217;s run the following deployment and see how it affects our cluster.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: yaml; title: ; notranslate\" title=\"\">\n---\napiVersion: apps\/v1\nkind: Deployment\nmetadata:\n  labels:\n    app: nginx\n  name: nginx\nspec:\n  replicas: 3\n  selector:\n    matchLabels:\n      app: nginx\n  strategy:\n    rollingUpdate:\n      maxSurge: 1\n      maxUnavailable: 0\n    type: RollingUpdate\n  template:\n    metadata:\n      labels:\n        app: nginx\n    spec:\n      containers:\n      - image: nginx:latest\n        imagePullPolicy: Always\n        name: nginx\n        ports:\n        - containerPort: 80\n          protocol: TCP\n        resources:\n          limits:\n            cpu: 1000m\n            memory: 1024Mi\n          requests:\n            cpu: 1000m\n            memory: 1024Mi\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"407\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-3-1-1024x407.png\" alt=\"\" class=\"wp-image-28520\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-3-1-1024x407.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-3-1-300x119.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-3-1-768x305.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-3-1-1536x610.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-3-1-2048x814.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Do not hesitate to modify the number of replicas of the deployment to force your cluster to scale up if needed. In this cluster, the deployment cannot create all the replicas due to insufficient resources.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"283\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-4-1024x283.png\" alt=\"\" class=\"wp-image-28519\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-4-1024x283.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-4-300x83.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-4-768x212.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-4-1536x424.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-4-2048x566.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>We can see that the cluster has been scaled up automatically.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"412\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-5-1024x412.png\" alt=\"\" class=\"wp-image-28521\" style=\"width:840px;height:338px\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-5-1024x412.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-5-300x121.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-5-768x309.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-5-1536x617.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-5-2048x823.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"480\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-6-1024x480.png\" alt=\"\" class=\"wp-image-28522\" style=\"width:840px;height:27px\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-6-1024x480.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-6-300x141.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-6-768x360.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-6-1536x719.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-6-2048x959.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Once the provisioning of the new worker nodes is complete, the deployment should be good.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"455\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-7-1024x455.png\" alt=\"\" class=\"wp-image-28523\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-7-1024x455.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-7-300x133.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-7-768x341.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-7-1536x682.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-7-2048x909.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"411\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-8-1024x411.png\" alt=\"\" class=\"wp-image-28524\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-8-1024x411.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-8-300x120.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-8-768x308.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-8-1536x616.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-8-2048x821.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"322\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-9-1024x322.png\" alt=\"\" class=\"wp-image-28525\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-9-1024x322.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-9-300x94.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-9-768x242.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-9-1536x483.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-9.png 1729w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Now let&#8217;s scale down the replicas of the deployment and wait 10 minutes.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"260\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-10-1024x260.png\" alt=\"\" class=\"wp-image-28526\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-10-1024x260.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-10-300x76.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-10-768x195.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-10-1536x390.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-10-2048x520.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"411\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-11-1024x411.png\" alt=\"\" class=\"wp-image-28527\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-11-1024x411.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-11-300x120.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-11-768x308.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-11-1536x617.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-11-2048x822.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>While waiting, you can also monitor the logs of the autoscaler to verify that it is indeed monitoring the cluster.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"566\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-12-1024x566.png\" alt=\"\" class=\"wp-image-28528\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-12-1024x566.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-12-300x166.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-12-768x424.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-12-1536x848.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-12-2048x1131.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"453\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-13-1024x453.png\" alt=\"\" class=\"wp-image-28529\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-13-1024x453.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-13-300x133.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-13-768x340.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-13-1536x680.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-13-2048x907.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The cluster should has been automatically scale down.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"426\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-14-1024x426.png\" alt=\"\" class=\"wp-image-28530\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-14-1024x426.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-14-300x125.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-14-768x320.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-14-1536x639.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-test-14-2048x852.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2>\n\n\n\n<p>Cluster autoscaling is a great feature that greatly enhances your cluster health by adding more nodes if needed. And it is quite fast and easy to set up for RKE2 clusters! To go even further, check this <a href=\"https:\/\/www.dbi-services.com\/blog\/rancher-rke2-rancher-roles-for-cluster-autoscaler\/\">article<\/a> that explains how to set up Rancher roles for the cluster autoscaler to avoid using an admin token.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"block-cd4f374f-6156-4de2-a1a8-27935d12aa60\">Links<\/h2>\n\n\n\n<p id=\"block-844b2797-904b-4875-a884-fde347c3f85d\">Rancher official documentation: <a href=\"https:\/\/ranchermanager.docs.rancher.com\/\">Rancher<\/a><br>RKE2 official documentation: <a href=\"https:\/\/docs.rke2.io\/\">RKE2<\/a><br>GitHub cluster autoscaler: <a href=\"https:\/\/github.com\/kubernetes\/autoscaler\/tree\/master\/cluster-autoscaler\">https:\/\/github.com\/kubernetes\/autoscaler\/tree\/master\/cluster-autoscaler<\/a><\/p>\n\n\n\n<p id=\"block-6a55621f-8659-4450-897d-e712a8952de2\">Blog &#8211; Rancher RKE2: Rancher roles for cluster autoscaler<br><a href=\"https:\/\/www.dbi-services.com\/blog\/rancher-autoscaler-enable-rke2-node-autoscaling\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.dbi-services.com\/blog\/rancher-rke2-rancher-roles-for-cluster-autoscaler\/<\/a><br>Blog &#8211; Reestablish administrator role access to Rancher users<br><a href=\"https:\/\/www.dbi-services.com\/blog\/reestablish-administrator-role-access-to-rancher-users\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.dbi-services.com\/blog\/reestablish-administrator-role-access-to-rancher-users\/<\/a><br>Blog &#8211; Introduction and RKE2 cluster template for AWS EC2<br><a href=\"https:\/\/www.dbi-services.com\/blog\/rancher-rke2-cluster-templates-for-aws-ec2\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.dbi-services.com\/blog\/rancher-rke2-cluster-templates-for-aws-ec2<\/a><br>Blog &#8211; Rancher RKE2 templates &#8211; Assign members to clusters<br><a href=\"https:\/\/www.dbi-services.com\/blog\/rancher-rke2-templates-assign-members-to-clusters\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.dbi-services.com\/blog\/rancher-rke2-templates-assign-members-to-clusters<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Rancher, if you make use of node drivers to provision your RKE2 nodes, you can also make use of the cluster autoscaler. In this article, I will show you how simply you can configure the autoscaler for your cluster. Rancher official documentation: RancherRKE2 official documentation: RKE2 Cluster autoscaler Cluster autoscaler is a tool that [&hellip;]<\/p>\n","protected":false},"author":132,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1320,1522],"tags":[3146,2398,2667,3145,1365,2634,93,3150,3151,3148,2276,3143,3144,309],"type_dbi":[3017,2943],"class_list":["post-28479","post","type-post","status-publish","format-standard","hentry","category-devops","category-kubernetes","tag-autoscaler","tag-autoscaling","tag-devops-2","tag-drivers","tag-k8s","tag-kubernetes-2","tag-node","tag-node-autoscaler","tag-node-autoscaling","tag-node-drivers","tag-rancher","tag-rke","tag-rke2","tag-suse","type-devops","type-kubernetes"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Rancher autoscaler - Enable RKE2 node autoscaling - dbi Blog<\/title>\n<meta name=\"description\" content=\"In this article, I will show you how you can enable autoscaling for your cluster. Therefore enabling autoscaling for Kubernetes in Rancher.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/rancher-autoscaler-enable-rke2-node-autoscaling\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Rancher autoscaler - Enable RKE2 node autoscaling\" \/>\n<meta property=\"og:description\" content=\"In this article, I will show you how you can enable autoscaling for your cluster. Therefore enabling autoscaling for Kubernetes in Rancher.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/rancher-autoscaler-enable-rke2-node-autoscaling\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-10-31T11:30:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-06-10T09:45:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-node-provisioner-1024x560.png\" \/>\n<meta name=\"author\" content=\"K\u00e9vin Keovilay\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"K\u00e9vin Keovilay\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/rancher-autoscaler-enable-rke2-node-autoscaling\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/rancher-autoscaler-enable-rke2-node-autoscaling\\\/\"},\"author\":{\"name\":\"K\u00e9vin Keovilay\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/3fb75c1e02be0c3b331471c8313cd9f7\"},\"headline\":\"Rancher autoscaler &#8211; Enable RKE2 node autoscaling\",\"datePublished\":\"2023-10-31T11:30:08+00:00\",\"dateModified\":\"2024-06-10T09:45:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/rancher-autoscaler-enable-rke2-node-autoscaling\\\/\"},\"wordCount\":867,\"commentCount\":2,\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/rancher-autoscaler-enable-rke2-node-autoscaling\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/10\\\/rancher-node-provisioner-1024x560.png\",\"keywords\":[\"autoscaler\",\"autoscaling\",\"devops\",\"drivers\",\"k8s\",\"kubernetes\",\"node\",\"node autoscaler\",\"node autoscaling\",\"node drivers\",\"Rancher\",\"rke\",\"rke2\",\"SuSE\"],\"articleSection\":[\"DevOps\",\"Kubernetes\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/rancher-autoscaler-enable-rke2-node-autoscaling\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/rancher-autoscaler-enable-rke2-node-autoscaling\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/rancher-autoscaler-enable-rke2-node-autoscaling\\\/\",\"name\":\"Rancher autoscaler - Enable RKE2 node autoscaling - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/rancher-autoscaler-enable-rke2-node-autoscaling\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/rancher-autoscaler-enable-rke2-node-autoscaling\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/10\\\/rancher-node-provisioner-1024x560.png\",\"datePublished\":\"2023-10-31T11:30:08+00:00\",\"dateModified\":\"2024-06-10T09:45:17+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/3fb75c1e02be0c3b331471c8313cd9f7\"},\"description\":\"In this article, I will show you how you can enable autoscaling for your cluster. Therefore enabling autoscaling for Kubernetes in Rancher.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/rancher-autoscaler-enable-rke2-node-autoscaling\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/rancher-autoscaler-enable-rke2-node-autoscaling\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/rancher-autoscaler-enable-rke2-node-autoscaling\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/10\\\/rancher-node-provisioner.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/10\\\/rancher-node-provisioner.png\",\"width\":3446,\"height\":1884},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/rancher-autoscaler-enable-rke2-node-autoscaling\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Rancher autoscaler &#8211; Enable RKE2 node autoscaling\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/3fb75c1e02be0c3b331471c8313cd9f7\",\"name\":\"K\u00e9vin Keovilay\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/aea984148a511f3db5117060e702df298f486588cee7781bb56a7bd92ac44a50?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/aea984148a511f3db5117060e702df298f486588cee7781bb56a7bd92ac44a50?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/aea984148a511f3db5117060e702df298f486588cee7781bb56a7bd92ac44a50?s=96&d=mm&r=g\",\"caption\":\"K\u00e9vin Keovilay\"},\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/kevinkeovilay\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Rancher autoscaler - Enable RKE2 node autoscaling - dbi Blog","description":"In this article, I will show you how you can enable autoscaling for your cluster. Therefore enabling autoscaling for Kubernetes in Rancher.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/rancher-autoscaler-enable-rke2-node-autoscaling\/","og_locale":"en_US","og_type":"article","og_title":"Rancher autoscaler - Enable RKE2 node autoscaling","og_description":"In this article, I will show you how you can enable autoscaling for your cluster. Therefore enabling autoscaling for Kubernetes in Rancher.","og_url":"https:\/\/www.dbi-services.com\/blog\/rancher-autoscaler-enable-rke2-node-autoscaling\/","og_site_name":"dbi Blog","article_published_time":"2023-10-31T11:30:08+00:00","article_modified_time":"2024-06-10T09:45:17+00:00","og_image":[{"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-node-provisioner-1024x560.png","type":"","width":"","height":""}],"author":"K\u00e9vin Keovilay","twitter_card":"summary_large_image","twitter_misc":{"Written by":"K\u00e9vin Keovilay","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/rancher-autoscaler-enable-rke2-node-autoscaling\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/rancher-autoscaler-enable-rke2-node-autoscaling\/"},"author":{"name":"K\u00e9vin Keovilay","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/3fb75c1e02be0c3b331471c8313cd9f7"},"headline":"Rancher autoscaler &#8211; Enable RKE2 node autoscaling","datePublished":"2023-10-31T11:30:08+00:00","dateModified":"2024-06-10T09:45:17+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/rancher-autoscaler-enable-rke2-node-autoscaling\/"},"wordCount":867,"commentCount":2,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/rancher-autoscaler-enable-rke2-node-autoscaling\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-node-provisioner-1024x560.png","keywords":["autoscaler","autoscaling","devops","drivers","k8s","kubernetes","node","node autoscaler","node autoscaling","node drivers","Rancher","rke","rke2","SuSE"],"articleSection":["DevOps","Kubernetes"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/rancher-autoscaler-enable-rke2-node-autoscaling\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/rancher-autoscaler-enable-rke2-node-autoscaling\/","url":"https:\/\/www.dbi-services.com\/blog\/rancher-autoscaler-enable-rke2-node-autoscaling\/","name":"Rancher autoscaler - Enable RKE2 node autoscaling - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/rancher-autoscaler-enable-rke2-node-autoscaling\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/rancher-autoscaler-enable-rke2-node-autoscaling\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-node-provisioner-1024x560.png","datePublished":"2023-10-31T11:30:08+00:00","dateModified":"2024-06-10T09:45:17+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/3fb75c1e02be0c3b331471c8313cd9f7"},"description":"In this article, I will show you how you can enable autoscaling for your cluster. Therefore enabling autoscaling for Kubernetes in Rancher.","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/rancher-autoscaler-enable-rke2-node-autoscaling\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/rancher-autoscaler-enable-rke2-node-autoscaling\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/rancher-autoscaler-enable-rke2-node-autoscaling\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-node-provisioner.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/rancher-node-provisioner.png","width":3446,"height":1884},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/rancher-autoscaler-enable-rke2-node-autoscaling\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Rancher autoscaler &#8211; Enable RKE2 node autoscaling"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/3fb75c1e02be0c3b331471c8313cd9f7","name":"K\u00e9vin Keovilay","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/aea984148a511f3db5117060e702df298f486588cee7781bb56a7bd92ac44a50?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/aea984148a511f3db5117060e702df298f486588cee7781bb56a7bd92ac44a50?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/aea984148a511f3db5117060e702df298f486588cee7781bb56a7bd92ac44a50?s=96&d=mm&r=g","caption":"K\u00e9vin Keovilay"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/kevinkeovilay\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/28479","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/132"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=28479"}],"version-history":[{"count":18,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/28479\/revisions"}],"predecessor-version":[{"id":33585,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/28479\/revisions\/33585"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=28479"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=28479"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=28479"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=28479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}