You can create a cluster from an RKE template that you created, or from a template that has been shared with you.
RKE templates can be applied to new clusters.
You can save the configuration of an existing cluster as an RKE template. Then the cluster’s settings can only be changed if the template is updated.
You can’t change a cluster to use a different RKE template. You can only update the cluster to a new revision of the same template.
This section covers the following topics:
- Creating a cluster from an RKE template
- Updating a cluster created with an RKE template
- Converting an existing cluster to use an RKE template
Creating a Cluster from an RKE Template
To add a cluster hosted by an infrastructure provider using an RKE template, use these steps:
- From the Global view, go to the Clusters tab.
- Click Add Cluster and choose the infrastructure provider.
- Provide the cluster name and node template details as usual.
- To use an RKE template, under the Cluster Options, check the box for Use an existing RKE template and revision.
- Choose an existing template and revision from the dropdown menu.
- Optional: You can edit any settings that the RKE template owner marked as Allow User Override when the template was created. If there are settings that you want to change, but don’t have the option to, you will need to contact the template owner to get a new revision of the template. Then you will need to edit the cluster to upgrade it to the new revision.
- Click Save to launch the cluster.
Updating a Cluster Created with an RKE Template
When the template owner creates a template, each setting has a switch in the Rancher UI that indicates if users can override the setting.
- If the setting allows a user override, you can update these settings in the cluster by editing the cluster.
- If the switch is turned off, you cannot change these settings unless the cluster owner creates a template revision that lets you override them. If there are settings that you want to change, but don’t have the option to, you will need to contact the template owner to get a new revision of the template.
If a cluster was created from an RKE template, you can edit the cluster to update the cluster to a new revision of the template.
An existing cluster’s settings can be saved as an RKE template. In that situation, you can also edit the cluster to update the cluster to a new revision of the template.
Note: You can’t change the cluster to use a different RKE template. You can only update the cluster to a new revision of the same template.
Converting an Existing Cluster to Use an RKE Template
This section describes how to create an RKE template from an existing cluster.
RKE templates cannot be applied to existing clusters, except if you save an existing cluster’s settings as an RKE template. This exports the cluster’s settings as a new RKE template, and also binds the cluster to that template. The result is that the cluster can only be changed if the template is updated, and the cluster is upgraded to use a newer version of the template.
To convert an existing cluster to use an RKE template,
- From the Global view in Rancher, click the Clusters tab.
- Go to the cluster that will be converted to use an RKE template. Click ⋮ > Save as RKE Template.
- Enter a name for the template in the form that appears, and click Create.
- A new RKE template is created.
- The cluster is converted to use the new template.
- New clusters can be created from the new template.