Longhorn Add-On

Longhorn is a CNCF Sandbox Project originally developed by Rancher labs as a “lightweight, reliable and easy-to-use distributed block storage system for Kubernetes”. Longhorn uses a microservice-based architecture to create a pod for every Custom Resource in the Longhorn ecosystem: Volumes, Replicas, a control plane, a data plane, etc.

Longhorn uses the /var/lib/longhorn directory for storage on all nodes. This directory should have enough space to hold a complete copy of every PersistentVolumeClaim that will be in the cluster. For production installs, an SSD should be mounted at /var/lib/longhorn.

Advanced Install Options

    version: latest
    uiBindPort: 30880
    uiReplicaCount: 0

Flag Usage
version The version of Longhorn to be installed.
uiBindPort The port number used for the NodePort service exposing the Longhorn UI. Default is 30880.
uiReplicaCount The number of replicas created for the Longhorn UI Deployment. Default is 0.

Longhorn UI

The Longhorn UI deployment does not run by default because it is an unauthenticated application. It can be enabled by setting the replica count to 1 in the longhorn spec. This will make the UI available on port 30880 on all nodes in the cluster.

    version: latest
    uiReplicaCount: 1

To enable the UI without re-running the installer, use the command kubectl -n longhorn-system scale deployment longhorn-ui --replicas=1.