Duplication of imported clusters is not supported.
Download and install Rancher CLI. Remember to if necessary.
Begin by using Rancher CLI to export the configuration for the cluster that you want to clone.
Find the cluster that you want to clone, and copy either its resource
ID
orNAME
to your clipboard. From this point on, we’ll refer to the resourceID
orNAME
as<RESOURCE_ID>
, which is used as a placeholder in the next step.Enter the following command to export the configuration for your cluster.
Step Result: The YAML for a cloned cluster prints to Terminal.
Use your favorite text editor to modify the cluster configuration in cluster-template.yml
for your cloned cluster.
Open
cluster-template.yml
(or whatever you named your config) in your favorite text editor.As depicted in the example below, at the placeholder, replace your original cluster’s name with a unique name (
<CLUSTER_NAME>
). If your cloned cluster has a duplicate name, the cluster will not provision successfully.For each
nodePools
section, replace the original nodepool name with a unique name at the<NODEPOOL_NAME>
placeholder. If your cloned cluster has a duplicate nodepool name, the cluster will not provision successfully.
Result: Your cloned cluster begins provisioning. Enter ./rancher cluster ls
to confirm. You can also log into the Rancher UI and open the Global view to watch your provisioning cluster’s progress.