{"id":30957,"date":"2024-03-07T11:42:13","date_gmt":"2024-03-07T10:42:13","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=30957"},"modified":"2024-03-12T11:23:28","modified_gmt":"2024-03-12T10:23:28","slug":"rancher-rke2-cluster-templates-for-aws-ec2","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/rancher-rke2-cluster-templates-for-aws-ec2\/","title":{"rendered":"Rancher RKE2: Introduction on RKE2 cluster template for AWS EC2"},"content":{"rendered":"\n<p>In Rancher, you can preconfigure your clusters and node configuration. Then your team can start provisioning clusters, with consistency and no misconfiguration. For RKE, templates are easily comprehensible and seamlessly integrated into the Rancher UI, making it user-friendly. For RKE2, we need to make use of the RKE2 cluster template.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-get-started-with-rke2-cluster-template\">Get started with RKE2 cluster template<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-rke2-cluster-template\">RKE2 cluster template<\/h3>\n\n\n\n<p>For RKE2, you need to make use of cluster templates. The cluster template is a Helm chart that you deploy into your Rancher management cluster (local) under the fleet-default namespace. Rancher will provision your cluster in the presence of these resources.<\/p>\n\n\n\n<p>To help you understand how it works, we will deploy one RKE2 cluster on AWS EC2 using a simplified RKE2 cluster template. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-cluster-specifications\">Cluster specifications<\/h3>\n\n\n\n<p>The Rancher version is 2.8.2.<\/p>\n\n\n\n<p>For our example, you need to specify a VPC ID and subnet ID. I am using a private subnet and all machines will use private IP addresses. <\/p>\n\n\n\n<p>Also, you need to set the region and availability zone. For our example, it is set to the region eu-central-1 and availability zone a.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-templates-files\">Templates files<\/h3>\n\n\n\n<p>The RKE2 cluster template is available at the following git repository: <a href=\"https:\/\/github.com\/kkedbi\/cluster-template-examples\/tree\/rke2-ec2\">https:\/\/github.com\/kkedbi\/cluster-template-examples\/tree\/rke2-ec2<\/a><\/p>\n\n\n\n<p>It is a classic Helm repository, for more information about Helm: <a href=\"https:\/\/helm.sh\/\n\">https:\/\/helm.sh\/<br><\/a>Let&#8217;s look into some files.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n.\n\u251c\u2500\u2500 charts \n\u2502   \u251c\u2500\u2500 Chart.yaml # A YAML file containing information about the chart\n\u2502   \u251c\u2500\u2500 README.md\n\u2502   \u251c\u2500\u2500 questions.yaml\n\u2502   \u251c\u2500\u2500 templates\n\u2502   \u2502   \u251c\u2500\u2500 _helpers.tpl\n\u2502   \u2502   \u251c\u2500\u2500 cluster.yaml\n\u2502   \u2502   \u251c\u2500\u2500 managedcharts.yaml\n\u2502   \u2502   \u2514\u2500\u2500 nodeconfig-aws.yaml\n\u2502   \u2514\u2500\u2500 values.yaml # The default configuration values for this chart\n\u251c\u2500\u2500 dbiservices-template-ec2-0.0.1.tgz\n\u2514\u2500\u2500 index.yaml\n<\/pre><\/div>\n\n\n<p>The file Chart.yaml contains the information about the chart. You can define multiple information about your chart like the name, description, versions, etc. (<a href=\"https:\/\/helm.sh\/docs\/topics\/charts\/\">https:\/\/helm.sh\/docs\/topics\/charts\/<\/a>).<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: yaml; title: ; notranslate\" title=\"\">\napiVersion: v1\nname: dbiservices-template-ec2\ndescription: Cluster template for amazon ec2 rke2 \nversion: 0.0.1\nannotations:\n  catalog.cattle.io\/type: cluster-template\n  catalog.cattle.io\/namespace: fleet-default\n<\/pre><\/div>\n\n\n<p>Note that the following annotation is mandatory to make the RKE2 Cluster template visible in Rancher.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ncatalog.cattle.io\/type: cluster-template\n<\/pre><\/div>\n\n\n<p>The directory &lt;templates&gt; contains templates of the Kubernetes resources.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>cluster.yaml<\/strong> is for the resource cluster.provisioning.cattle.io\/v1<br>It contains the cluster configuration (kubernetes configuration, machine pools, update strategy, etc.)<\/li>\n\n\n\n<li><strong>managedcharts.yaml<\/strong> contains charts to install unto the provisioned cluster.<\/li>\n\n\n\n<li><strong>nodeconfig-aws.yaml<\/strong> contains the configuration for AWS EC2 machines.<\/li>\n<\/ul>\n\n\n\n<p>Those files are forked from the official example GitHub repository of Rancher.<br>Feel free to create or edit those files to meet your needs.<\/p>\n\n\n\n<p>An easy solution to create your template depending on your needs, is to manually create the RKE2 cluster from Rancher, and download those YAML resources files. In this way, you will be sure which parameters are used and what values to set. <\/p>\n\n\n\n<p>The resources for the cluster and machines are available in the UI. <br>Cluster Management &gt; Cluster<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"327\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-27-1024x327.png\" alt=\"\" class=\"wp-image-31052\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-27-1024x327.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-27-300x96.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-27-768x245.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-27-1536x490.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-27.png 1730w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>local &gt; More Resources &gt; Amazonec2Config <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"315\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-29-1024x315.png\" alt=\"\" class=\"wp-image-31053\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-29-1024x315.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-29-300x92.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-29-768x236.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-29-1536x473.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-29.png 1913w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-installation-and-deployment\">Installation and deployment<\/h3>\n\n\n\n<p>For the following part, fork the GitHub repository including the branch. That way you can modify the Chart files to experiment and fit your needs.<\/p>\n\n\n\n<p>Let&#8217;s start by fixing the VPC configuration of our nodepools. In the <a href=\"https:\/\/github.com\/kkedbi\/cluster-template-examples\/blob\/rke2-ec2\/charts\/values.yaml\">values.yaml<\/a> file, find the following parameters for both nodepools and configure it with your AWS configuration.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: yaml; title: ; notranslate\" title=\"\">\n# AWS region\nregion: eu-central-1\n# AWS zone for instance (i.e. a,b,c,d,e)\nzone: a\n# AWS VPC id\nvpcId: &quot;vpc-xxxxxxxxxxxx&quot;\n# AWS VPC subnet id\nsubnetId: &quot;subnet-xxxxxxxxxxxx&quot;\n<\/pre><\/div>\n\n\n<p>Do not hesitate to check the other parameters and modify them depending of your needs.<br>Once done, save the file, and run the following command to package the chart.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nhelm package charts\nhelm repo index .\n\ngit add .\ngit commit -m &#039;update values.yaml and repackage&#039;\ngit push\n<\/pre><\/div>\n\n\n<p>As described in the <a href=\"https:\/\/ranchermanager.docs.rancher.com\/how-to-guides\/new-user-guides\/manage-clusters\/manage-cluster-templates\">official documentation<\/a>, to use RKE2 templates, we need to add the repositories into Rancher. <\/p>\n\n\n\n<p>In Cluster Management &gt; Advanced &gt; Repositories &gt; Create.<\/p>\n\n\n\n<p>Name: dbiservices-rke2<br>Target: Git repository containing Helm chart or cluster template definitions<br>Git Repo URL: <a href=\"https:\/\/github.com\/kkedbi\/cluster-template-examples\n\">https:\/\/github.com\/kkedbi\/cluster-template-examples<br><\/a>Git Branch: rke2-ec2<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"267\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-31-1024x267.png\" alt=\"\" class=\"wp-image-31077\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-31-1024x267.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-31-300x78.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-31-768x200.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-31-1536x400.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-31.png 1920w\" 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=\"447\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-32-1024x447.png\" alt=\"\" class=\"wp-image-31079\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-32-1024x447.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-32-300x131.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-32-768x335.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-32-1536x671.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-32.png 1915w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Once the repository is added, the RKE2 template will automatically be available when you create a new cluster.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"286\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-34-1024x286.png\" alt=\"\" class=\"wp-image-31081\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-34-1024x286.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-34-300x84.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-34-768x215.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-34-1536x429.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-34.png 1915w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Click on the dbiservices-template-ec2, it will bring you to the form to configure some of the cluster parameters.<br>This form is described as YAML code in <a href=\"https:\/\/github.com\/kkedbi\/cluster-template-examples\/blob\/rke2-ec2\/charts\/questions.yaml\">Charts\/questions.yaml<\/a>. It is entirely customizable to fit your needs. Through the form, we can specify the Kubernetes version, CNI, VPC ID, Region, etc.<\/p>\n\n\n\n<p>In group General, I use an AWS Credentials created in Rancher, chose RKE2 version 1.26, and Canal as Container Network.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"405\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-36-1024x405.png\" alt=\"\" class=\"wp-image-31096\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-36-1024x405.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-36-300x119.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-36-768x304.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-36-1536x607.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-36.png 1675w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Then you can directly configure the nodepool for controlplane and workers.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"354\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-37-1024x354.png\" alt=\"\" class=\"wp-image-31098\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-37-1024x354.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-37-300x104.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-37-768x266.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-37-1536x531.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-37.png 1688w\" 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=\"330\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-38-1024x330.png\" alt=\"\" class=\"wp-image-31099\" style=\"width:841px;height:auto\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-38-1024x330.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-38-300x97.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-38-768x247.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-38-1536x495.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-38.png 1673w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Once complete, click on install. It will install the Helm chart into the Rancher cluster (local), in the namespace fleet-default. <br><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"185\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-39-1024x185.png\" alt=\"\" class=\"wp-image-31100\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-39-1024x185.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-39-300x54.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-39-768x139.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-39-1536x278.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-39.png 1911w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>In case you need to remove the cluster, delete the Apps instead of the cluster. It ensures that all resources created by the Helm chart are deleted. For example, the ManagedChart is not deleted if you delete only the cluster.<\/p>\n\n\n\n<p>Now, the cluster is provisioned with the predefined parameters in values.yaml, in addition to the customized parameters from the question.yaml form.<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"371\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-40-1024x371.png\" alt=\"\" class=\"wp-image-31101\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-40-1024x371.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-40-300x109.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-40-768x279.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-40-1536x557.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-40.png 1908w\" 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>The usage of templates is not complex.<br>In the example above, I allowed the user to choose the Kubernetes version, the CNI, the quantity from 1 to 3 for the node pool, and their instance type. You can predefined and fix those values directly in the values.yaml or templates files. <br>A few fixed parameters were related to the AWS network (VPC, subnet, region, etc.). Therefore the user who uses the template doesn&#8217;t need any visibility and information about AWS configuration.<\/p>\n\n\n\n<p>The advantage of templates is to allow users who have the rights, to create a cluster with the correct, standardized configuration, that adheres to the internal IT guidelines of your company. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-additional-information\">Additional information<\/h2>\n\n\n\n<p>A few modifications are made in the branch <strong>rke2-ec2 <\/strong>of the forked repository, <\/p>\n\n\n\n<p>For cluster.yaml, I prefixed the nodepool name with the cluster name. The purpose is to avoid errors if a nodepool already exists with the same name.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: yaml; title: ; notranslate\" title=\"\">\n      name: {{ $.Values.cluster.name }}-{{ $nodepool.name }}\n<\/pre><\/div>\n\n\n<p>For nodeconfig-aws.yaml, I added the function quote for the parameters retries, rootSize, and spotPrice to force type string.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: yaml; title: ; notranslate\" title=\"\">\nspotPrice: {{ quote $nodepool.spotPrice }}\nretries: {{ quote $nodepool.retries }}\nrootSize: {{ quote $nodepool.rootSize }}\n<\/pre><\/div>\n\n\n<p>To go further, check the next blog article about assigning members to the cluster from the template.<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\n\n\n<h2 class=\"wp-block-heading\" id=\"h-sources\">Sources<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Official documentation for Cluster Template<br><a href=\"https:\/\/ranchermanager.docs.rancher.com\/how-to-guides\/new-user-guides\/manage-clusters\/manage-cluster-templates\">https:\/\/ranchermanager.docs.rancher.com\/how-to-guides\/new-user-guides\/manage-clusters\/manage-cluster-templates<\/a><\/li>\n\n\n\n<li>My GitHub repository is a fork of the official examples repository which is denser and more complete<br><a href=\"https:\/\/github.com\/rancher\/cluster-template-examples\/tree\/main\">https:\/\/github.com\/rancher\/cluster-template-examples\/tree\/main<\/a>,.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-blogs\">Blogs<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>RKE2 Autoscaling<br><a href=\"https:\/\/www.dbi-services.com\/blog\/rancher-autoscaler-enable-rke2-node-autoscaling\/\n\">https:\/\/www.dbi-services.com\/blog\/rancher-autoscaler-enable-rke2-node-autoscaling\/<\/a><\/li>\n\n\n\n<li>Reestablish administrator role access to rancher users<br><a href=\"https:\/\/www.dbi-services.com\/blog\/reestablish-administrator-role-access-to-rancher-users\/\">https:\/\/www.dbi-services.com\/blog\/reestablish-administrator-role-access-to-rancher-users\/<\/a><br>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><br><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>In Rancher, you can preconfigure your clusters and node configuration. Then your team can start provisioning clusters, with consistency and no misconfiguration. For RKE, templates are easily comprehensible and seamlessly integrated into the Rancher UI, making it user-friendly. For RKE2, we need to make use of the RKE2 cluster template. Get started with RKE2 cluster [&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":[2667,2634,2276,309],"type_dbi":[3017,2943,3243,3244],"class_list":["post-30957","post","type-post","status-publish","format-standard","hentry","category-devops","category-kubernetes","tag-devops-2","tag-kubernetes-2","tag-rancher","tag-suse","type-devops","type-kubernetes","type-rancher","type-suse"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Rancher RKE2 cluster template for AWS EC2 - dbi Blog<\/title>\n<meta name=\"description\" content=\"In Rancher, you can preconfigure your clusters and node configuration. Here is an introduction to RKE2 cluster template for AWS EC2.\" \/>\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-rke2-cluster-templates-for-aws-ec2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Rancher RKE2: Introduction on RKE2 cluster template for AWS EC2\" \/>\n<meta property=\"og:description\" content=\"In Rancher, you can preconfigure your clusters and node configuration. Here is an introduction to RKE2 cluster template for AWS EC2.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/rancher-rke2-cluster-templates-for-aws-ec2\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-03-07T10:42:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-12T10:23:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-27-1024x327.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=\"7 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-rke2-cluster-templates-for-aws-ec2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/rancher-rke2-cluster-templates-for-aws-ec2\/\"},\"author\":{\"name\":\"K\u00e9vin Keovilay\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/3fb75c1e02be0c3b331471c8313cd9f7\"},\"headline\":\"Rancher RKE2: Introduction on RKE2 cluster template for AWS EC2\",\"datePublished\":\"2024-03-07T10:42:13+00:00\",\"dateModified\":\"2024-03-12T10:23:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/rancher-rke2-cluster-templates-for-aws-ec2\/\"},\"wordCount\":1012,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/rancher-rke2-cluster-templates-for-aws-ec2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-27-1024x327.png\",\"keywords\":[\"devops\",\"kubernetes\",\"Rancher\",\"SuSE\"],\"articleSection\":[\"DevOps\",\"Kubernetes\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/rancher-rke2-cluster-templates-for-aws-ec2\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/rancher-rke2-cluster-templates-for-aws-ec2\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/rancher-rke2-cluster-templates-for-aws-ec2\/\",\"name\":\"Rancher RKE2 cluster template for AWS EC2 - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/rancher-rke2-cluster-templates-for-aws-ec2\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/rancher-rke2-cluster-templates-for-aws-ec2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-27-1024x327.png\",\"datePublished\":\"2024-03-07T10:42:13+00:00\",\"dateModified\":\"2024-03-12T10:23:28+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/3fb75c1e02be0c3b331471c8313cd9f7\"},\"description\":\"In Rancher, you can preconfigure your clusters and node configuration. Here is an introduction to RKE2 cluster template for AWS EC2.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/rancher-rke2-cluster-templates-for-aws-ec2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/rancher-rke2-cluster-templates-for-aws-ec2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/rancher-rke2-cluster-templates-for-aws-ec2\/#primaryimage\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-27.png\",\"contentUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-27.png\",\"width\":1730,\"height\":552},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/rancher-rke2-cluster-templates-for-aws-ec2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Rancher RKE2: Introduction on RKE2 cluster template for AWS EC2\"}]},{\"@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 RKE2 cluster template for AWS EC2 - dbi Blog","description":"In Rancher, you can preconfigure your clusters and node configuration. Here is an introduction to RKE2 cluster template for AWS EC2.","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-rke2-cluster-templates-for-aws-ec2\/","og_locale":"en_US","og_type":"article","og_title":"Rancher RKE2: Introduction on RKE2 cluster template for AWS EC2","og_description":"In Rancher, you can preconfigure your clusters and node configuration. Here is an introduction to RKE2 cluster template for AWS EC2.","og_url":"https:\/\/www.dbi-services.com\/blog\/rancher-rke2-cluster-templates-for-aws-ec2\/","og_site_name":"dbi Blog","article_published_time":"2024-03-07T10:42:13+00:00","article_modified_time":"2024-03-12T10:23:28+00:00","og_image":[{"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-27-1024x327.png","type":"","width":"","height":""}],"author":"K\u00e9vin Keovilay","twitter_card":"summary_large_image","twitter_misc":{"Written by":"K\u00e9vin Keovilay","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/rancher-rke2-cluster-templates-for-aws-ec2\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/rancher-rke2-cluster-templates-for-aws-ec2\/"},"author":{"name":"K\u00e9vin Keovilay","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/3fb75c1e02be0c3b331471c8313cd9f7"},"headline":"Rancher RKE2: Introduction on RKE2 cluster template for AWS EC2","datePublished":"2024-03-07T10:42:13+00:00","dateModified":"2024-03-12T10:23:28+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/rancher-rke2-cluster-templates-for-aws-ec2\/"},"wordCount":1012,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/rancher-rke2-cluster-templates-for-aws-ec2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-27-1024x327.png","keywords":["devops","kubernetes","Rancher","SuSE"],"articleSection":["DevOps","Kubernetes"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/rancher-rke2-cluster-templates-for-aws-ec2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/rancher-rke2-cluster-templates-for-aws-ec2\/","url":"https:\/\/www.dbi-services.com\/blog\/rancher-rke2-cluster-templates-for-aws-ec2\/","name":"Rancher RKE2 cluster template for AWS EC2 - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/rancher-rke2-cluster-templates-for-aws-ec2\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/rancher-rke2-cluster-templates-for-aws-ec2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-27-1024x327.png","datePublished":"2024-03-07T10:42:13+00:00","dateModified":"2024-03-12T10:23:28+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/3fb75c1e02be0c3b331471c8313cd9f7"},"description":"In Rancher, you can preconfigure your clusters and node configuration. Here is an introduction to RKE2 cluster template for AWS EC2.","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/rancher-rke2-cluster-templates-for-aws-ec2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/rancher-rke2-cluster-templates-for-aws-ec2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/rancher-rke2-cluster-templates-for-aws-ec2\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-27.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/image-27.png","width":1730,"height":552},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/rancher-rke2-cluster-templates-for-aws-ec2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Rancher RKE2: Introduction on RKE2 cluster template for AWS EC2"}]},{"@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\/30957","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=30957"}],"version-history":[{"count":19,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/30957\/revisions"}],"predecessor-version":[{"id":31743,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/30957\/revisions\/31743"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=30957"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=30957"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=30957"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=30957"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}