Install with Helm

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

Prerequisites

  • Each node in the Kubernetes cluster where Longhorn will be installed must fulfill these requirements.
  • Helm v2.0+ must be installed on your workstation.

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

The initial settings for Longhorn can be customized using Helm options or by editing the deployment configuration file.

Notes on Installing Helm

For help installing Helm, refer to the official documentation.

If you’re using a Helm version prior to version 3.0, you need to install Tiller in your Kubernetes cluster with role-based access control (RBAC).

Installing Longhorn

  1. Add the Longhorn Helm repository:

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

    helm repo update
    
  3. Install Longhorn in the longhorn-system namespace. To install Longhorn with Helm 2, use this command:

    helm install longhorn/longhorn --name longhorn --namespace longhorn-system
    

    To install Longhorn with Helm 3, use these commands:

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

    kubectl -n longhorn-system get pod
    

    The result should look like the following:

    NAME                                        READY   STATUS              RESTARTS   AGE
    compatible-csi-attacher-d9fb48bcf-2rzmb     1/1     Running             0          8m58s
    csi-attacher-78bf9b9898-grn2c               1/1     Running             0          32s
    csi-attacher-78bf9b9898-lfzvq               1/1     Running             0          8m59s
    csi-attacher-78bf9b9898-r64sv               1/1     Running             0          33s
    csi-provisioner-8599d5bf97-c8r79            1/1     Running             0          33s
    csi-provisioner-8599d5bf97-fc5pz            1/1     Running             0          33s
    csi-provisioner-8599d5bf97-p9psl            1/1     Running             0          8m59s
    csi-resizer-586665f745-b7p6h                1/1     Running             0          8m59s
    csi-resizer-586665f745-kgdxs                1/1     Running             0          33s
    csi-resizer-586665f745-vsvvq                1/1     Running             0          33s
    engine-image-ei-e10d6bf5-pv2s6              1/1     Running             0          9m30s
    instance-manager-e-379373af                 1/1     Running             0          8m41s
    instance-manager-r-101f13ba                 1/1     Running             0          8m40s
    longhorn-csi-plugin-7v2dc                   4/4     Running             0          8m59s
    longhorn-driver-deployer-775897bdf6-k4sfd   1/1     Running             0          10m
    longhorn-manager-79xgj                      1/1     Running             0          9m50s
    longhorn-ui-9fbb5445-httqf                  0/1     Running             0          33s
    
  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.


© 2019-2024 Longhorn Authors | Documentation Distributed under CC-BY-4.0


© 2024 The Linux Foundation. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.