Longhorn is a lightweight, reliable, and powerful distributed block storage system for Kubernetes. Longhorn (henceforth LH) implements distributed block storage using containers and microservices. LH creates a dedicated storage controller for each block device volume and synchronously replicates the volume across multiple replicas stored on multiple nodes. The storage controller and replicas are themselves orchestrated using Kubernetes. The main features are:
- Enterprise-grade distributed block storage with no single point of failure;
- Incremental snapshot of block storage;
- Backup to secondary storage (NFS or S3-compatible object storage) built on efficient change block detection;
- Recurring snapshots and backups;
- Automated, non-disruptive upgrades. You can upgrade the entire LH software stack without disrupting running storage volumes;
- An intuitive GUI dashboard.
Installation
LH can be installed on a Kubernetes cluster in several ways: Rancher catalog app, kubectl or Helm. In this guide we will focus on the installation via Helm chart, which must of course be installed. However, for further details, please refer to the official guide.
Requirements
Each node in the Kubernetes cluster where LH is installed must fulfill the following requirements:
- A container runtime compatible with Kubernetes (Docker v1.13+, containerd v1.3.7+, etc.).
- Kubernetes v1.18+.
open-iscsi is installed, and the iscsid daemon is running on all the nodes. This is necessary, since LH relies on iscsiadm on the host to provide persistent volumes to Kubernetes.
RWX support requires that each node has a NFSv4 client installed.
The host filesystem supports the file extents feature to store the data. Currently we support ext4 and XFS.
- curl, findmnt, grep, awk, blkid, lsblk must be installed.
Mount propagation must be enabled.
A script has been written to help you gather enough information about the factors (note jq maybe required to be installed locally prior to running env check script). To run script
Installation with Helm
Add the LH Helm repository and fetch the latest charts from the repository
$ helm repo add longhorn https://charts.longhorn.io $ helm repo update
To install LH with Helm 3, use these commands
kubectl create namespace longhorn-system helm install longhorn longhorn/longhorn --namespace longhorn-system
The initial settings for Longhorn can be customized using Helm options or by editing the deployment configuration file. To obtain a copy of the values.yaml file
To confirm that the deployment succeeded, run