Install with Helm

In this section, you will learn how to install Longhorn with Helm.

Prerequisites

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

Installing Longhorn

Note:

  1. Add the Longhorn Helm repository:

    1. helm repo add longhorn https://charts.longhorn.io
  2. Fetch the latest charts from the repository:

    1. helm repo update
  3. Install Longhorn in the longhorn-system namespace.

    To install Longhorn with Helm 2, use the command:

    1. helm install longhorn/longhorn --name longhorn --namespace longhorn-system --version 1.5.1

    To install Longhorn with Helm 3, use the commands:

    1. helm install longhorn longhorn/longhorn --namespace longhorn-system --create-namespace --version 1.5.1
  4. To confirm that the deployment succeeded, run:

    1. kubectl -n longhorn-system get pod

    The result should look like the following:

    1. NAME READY STATUS RESTARTS AGE
    2. longhorn-ui-b7c844b49-w25g5 1/1 Running 0 2m41s
    3. longhorn-manager-pzgsp 1/1 Running 0 2m41s
    4. longhorn-driver-deployer-6bd59c9f76-lqczw 1/1 Running 0 2m41s
    5. longhorn-csi-plugin-mbwqz 2/2 Running 0 100s
    6. csi-snapshotter-588457fcdf-22bqp 1/1 Running 0 100s
    7. csi-snapshotter-588457fcdf-2wd6g 1/1 Running 0 100s
    8. csi-provisioner-869bdc4b79-mzrwf 1/1 Running 0 101s
    9. csi-provisioner-869bdc4b79-klgfm 1/1 Running 0 101s
    10. csi-resizer-6d8cf5f99f-fd2ck 1/1 Running 0 101s
    11. csi-provisioner-869bdc4b79-j46rx 1/1 Running 0 101s
    12. csi-snapshotter-588457fcdf-bvjdt 1/1 Running 0 100s
    13. csi-resizer-6d8cf5f99f-68cw7 1/1 Running 0 101s
    14. csi-attacher-7bf4b7f996-df8v6 1/1 Running 0 101s
    15. csi-attacher-7bf4b7f996-g9cwc 1/1 Running 0 101s
    16. csi-attacher-7bf4b7f996-8l9sw 1/1 Running 0 101s
    17. csi-resizer-6d8cf5f99f-smdjw 1/1 Running 0 101s
    18. instance-manager-b34d5db1fe1e2d52bcfb308be3166cfc 1/1 Running 0 114s
    19. engine-image-ei-df38d2e5-cv6nc 1/1 Running 0 114s
  5. To enable access to the Longhorn UI, you will need to set up an Ingress controller. Authentication to the Longhorn UI is not enabled by default. For information on creating an NGINX Ingress controller with basic authentication, refer to this section.

  6. Access the Longhorn UI using these steps.