...
LH can be installed on a Kubernetes cluster in several ways: Rancher catalog app, kubectl , Helmor 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.
...
- A container runtime compatible with Kubernetes (Docker v1.13+, containerd v1.3.7+, etc.).
- Kubernetes v1.16+ (recommend Kubernetes v1.17+).
open-iscsi is installed, and the iscsid daemon is running on all the nodes. This is necessary, since Longhorn relies on iscsiadm on the host to provide persistent volumes to Kubernetes.
Code Block language bash title Install iscsi # If not present, launch the command $ sudo yum install iscsi-initiator-utils -y
RWX support requires that each node has a NFSv4 client installed.
Code Block language bash title Install nfs-utils # If not present, launch the command $ sudo yum install nfs-utils -y
The host filesystem supports the file extents feature to store the data. Currently we support ext4 and XFS.
Code Block language bash title Filesystem type # Check that the database type is "xfs" or "ext4" $ df -T $ df -Th Filesystem Type Size Used Avail Use% Mounted on /dev/vda1 xfs 80G 5.0G 76G 7% /
- curl, findmnt, grep, awk, blkid, lsblk must be installed.
Mount propagation must be enabled.
Code Block language bash title Mount Propagationpropagation # Insert the following lines into the file "/etc/systemd/system/docker.service.d/mount_propagation_flags.conf" [Service] MountFlags=shared # Then restart the service $ sudo systemctl daemon-reload $ sudo systemctl restart docker.service
Installation
Add the Longhorn Helm repository and Fetch the latest charts from the repository
| Code Block | ||||
|---|---|---|---|---|
| ||||
$ helm repo add longhorn https://charts.longhorn.io
$ helm repo update |
To install Longhorn with Helm 3, use these commands
| Code Block | ||||
|---|---|---|---|---|
| ||||
kubectl create namespace longhorn-system
helm install longhorn longhorn/longhorn --namespace longhorn-system |