Member-only story
Longhorn: Kubernetes native block storage
Longhorn is a distributed block storage running on Kubernetes clusters.
In this article, we will deploy it on a Kubernetes cluster.
Longhorn Helm Chart
First we get a helm chart for longhorn.
helm repo add longhorn https://charts.longhorn.io
helm search repo longhorn
helm search repo longhorn --versions
helm show chart longhorn/longhorn
As of today (09/25/2024), its most recent version is v1.7.1. Its Kubernetes version requirement is 1.21.0–0 and above. This information comes from show chart
command. More requirements can be found at the official installation document. We are using Kubernetes 1.26.11 and Ubuntu 22.04. Let’s download the chart.
helm fetch longhorn/longhorn --version 1.7.1 --untar
Kubernetes Node Labeling
We are not planning to use all the nodes for longhorn storage. We will label some nodes for longhorn helm deployment.
kubectl label nodes [node-name] node.longhorn.io/create-default-disk=true
Since we plan to keep two copies of persistent volumes, we need to label at least two nodes.
Custom Values for Helm Installation
Here is our overridden values for helm values.
global:
nodeSelector:
node.longhorn.io/create-default-disk: "true"
service:
ui:
type…