Rancher Manager (Experimental)

Available as of v1.2.0

The rancher-vcluster addon allows you to run Rancher Manager as a workload on the underlying Harvester cluster and is implemented using vcluster.

Rancher Manager - 图1

The addon runs a nested K3s cluster in the rancher-vcluster namespace and deploys Rancher to this cluster.

During the installation, the ingress for Rancher is synced to the Harvester cluster, allowing end users to access Rancher.

Installing rancher-vcluster

The rancher-vcluster addon is not packaged with Harvester, but you can find it in the experimental-addons repo.

Assuming you are using the Harvester kubeconfig, you can run the following commands to install the addon:

  1. kubectl apply -f https://raw.githubusercontent.com/harvester/experimental-addons/main/rancher-vcluster/rancher-vcluster.yaml

Configuring rancher-vcluster

After installing the addon, you need to configure it from the Harvester UI as follows:

  1. Select Advanced > Addons.
  2. Find the rancher-vcluster addon and select > Edit Config.

Rancher Manager - 图2

  1. In the Hostname field, enter a valid DNS record pointing to the Harvester VIP. This is essential as the vcluster ingress is synced to the parent Harvester cluster. A valid hostname is used to filter ingress traffic to the vcluster workload.
  2. In the Bootstrap Password field, enter the bootstrap password for the new Rancher deployed on the vcluster.

Once the addon is deployed, Rancher can take a few minutes to become available.

You can then access Rancher via the hostname DNS record that you provided.

See Rancher Integration for more information.

Rancher Manager - 图3Disabling rancher-vcluster

The rancher-vcluster addon is deployed on a vcluster Statefulset that uses a Longhorn PVC.

When rancher-vcluster is disabled, the PVC data-rancher-vcluster-0 will remain in the rancher-vcluster namespace.

If you enable the addon again, the PVC is re-used, and Rancher will have the old state available again.

If you want to wipe the data, ensure that the PVC is deleted.