Skip to main content
Version: 3.4

Rancher

The Platform provides several points of integration at the virtual cluster level. With the help of the vCluster.Pro plugin for Rancher, we can create, delete and manage vClusters from the Rancher Dashboard. Also, you can import any existing vClusters created within the platform into Rancher at the click of a button.

Setup

Installing the Rancher Plugin

The plugin can be installed as below.

  1. In the Rancher Dashboard, click on the Hamburger menu and selectExtensions.
  2. Click on the kebab menu on the right and selectManage Repositories.
  3. Click on the button on the right. Give the repository a name and enter https://charts.loft.sh/ as Index URL. Finally click on the Create button at the bottom.
  4. Navigate back to theExtensionspage and click on Available tab. Click Install on the plugin named VCluster.Pro.
  5. Once the plugin is installed, you will be redirected automatically to the Installed tab.
  6. Finally, on the Cluster resource (management.cattle.io/v1 group) of the host cluster, add a loft.sh/loft-hostname label with the Loft hostname without protocol prefix, e.g. my-loft.demo.dev

Using the Rancher Plugin

Installing the plugin lets us create and delete virtual clusters from the Rancher Dashboard. Additionally, you can also access the platform's dashboard directly from the UI.

Creating a virtual cluster

  1. In the Rancher Dashboard, click on the button.
  2. Enter a name for the virtual cluster and select the Loft Project in which you wish to create the virtual cluster. Only those projects which have the Rancher Integration enabled would be displayed in the list.
  3. Click the button which will take you to the Create VirtualClusterInstance page within the platform.
  4. Click the Rancher configuration tab.
  5. Slide the Add to Rancher slider to enabled.
  6. Click on the button once you have configured the same as per your preference.
  7. Navigate back to the Rancher Dashboard. The virtual cluster would be available and in Activestate.

Deleting a virtual cluster

  1. In the Rancher Dashboard, click on the Delete icon for the virtual cluster you want to delete.
  2. You will be redirected to the platform's VirtualClusterInstance Page for confirmation.
  3. Click on the to confirm. The virtual cluster will be deleted from Rancher.

Importing vClusters into Rancher

Once a project has Rancher integration enabled, virtual clusters within that project are eligible to be synced into Rancher. You can enable virtual cluster import into Rancher during the virtual cluster creation step, or by enabling this feature on existing virtual clusters.

Make Sure Your Project Has Rancher Enabled!

If the project your virtual cluster resides in does not have Rancher integration enabled, you will not see the Add to Rancher option! Please follow this guide to enable the same.

  1. From the Projects Navigator in the left hand pane, switch to the desired Project.
  2. Click on Virtual Clusters and the button.
  3. In the popup, optionally select the virtual cluster template, then click the button.
  4. Click the Rancher configuration tab.
  5. Slide the Add to Rancher slider to enabled.
  6. Finish configuring anything else you'd like on your virtual cluster, then click the button.
Disabling Rancher Integration

You may disable the Rancher integration at a per virtual cluster or per project level by toggling the same sliders used to enable it. Disabling the integration at the virtual cluster level simply removes it in Rancher. Disabling the integration at the project level removes all virtual clusters from Rancher, so be careful when disabled at this level!