Install as a Rancher Apps & Marketplace

Run Longhorn on Kubernetes with Rancher 2.x

One benefit of installing Longhorn through Rancher Apps & Marketplace is that Rancher provides authentication to the Longhorn UI.

If there is a new version of Longhorn available, you will see an Upgrade Available sign on the Apps & Marketplace screen. You can click Upgrade button to upgrade Longhorn manager. See more about upgrade here.

Prerequisites

Each node in the Kubernetes cluster where Longhorn is installed must fulfill these requirements.

This script can be used to check the Longhorn environment for potential issues.

Installation

Note:

  • For Kubernetes < v1.25, if your cluster still enables Pod Security Policy admission controller, set Other Settings > Pod Security Policy to true to install longhorn-psp PodSecurityPolicy resource which allows privileged Longhorn pods to start.
  1. Optional: If Rancher version is 2.5.9 or before, we recommend creating a new project for Longhorn, for example, Storage.
  2. Navigate to the cluster where you will install Longhorn.

    Install as a Rancher Apps & Marketplace - 图1

  3. Navigate to the Apps & Marketplace screen.

    Install as a Rancher Apps & Marketplace - 图2

  4. Find the Longhorn item in the charts and click it.

    Install as a Rancher Apps & Marketplace - 图3

  5. Click Install.

    Install as a Rancher Apps & Marketplace - 图4

  6. Optional: Select the project where you want to install Longhorn.

  7. Optional: Customize the default settings.

    Install as a Rancher Apps & Marketplace - 图5

  8. Click Next. Longhorn will be installed in the longhorn-system namespace.

    Install as a Rancher Apps & Marketplace - 图6

  9. Click the Longhorn App Icon to navigate to the Longhorn dashboard.

    Install as a Rancher Apps & Marketplace - 图7

After Longhorn has been successfully installed, you can access the Longhorn UI by navigating to the Longhorn option from Rancher left panel.