Longhorn

Longhorn

Longhorn is a cloud native distributed block storage for Kubernetes, which means that every node has a copy of the data und pods can have access to persistent storage. Here the deployment is used for a single node cluster.

To install Longhorn onto the cluster helm can be used with the following values:

preUpgradeChecker:
  jobEnabled: false
service:
  ui:
    type: ClusterIP
ingress:
  enabled: true
  ingressClassName: cilium
  host: longhorn.westfall.thorados.de
  tls: false
  path: "/"
  annotations:
    ingress.cilium.io/loadbalancer-mode: shared
    ingress.cilium.io/websocket: enabled
longhornUI:
  replicas: 1
persistence:
  defaultClassReplicaCount: 1
  reclaimPolicy: Retain
csi:
  attacherReplicaCount: 1
  provisionerReplicaCount: 1
  resizerReplicaCount: 1
  snapshotterReplicaCount: 1
defaultSettings:
  defaultReplicaCount: 1

Installation with helm is done like this:

helm repo add longhorn https://charts.longhorn.io
helm upgrade \
    --install longhorn longhorn/longhorn \
    --namespace longhorn-system \
    -f longhorn-values.yaml \
    --create-namespace

Longhorn on Talos Linux

The image must contain the following two extensions:

  • siderolabs/iscsi-tools
  • siderolabs/util-linux-tools

Additionally for Longhorn the Pod Security must be changed for it’s namespace:

kubectl label namespace longhorn-system pod-security.kubernetes.io/enforce=privileged

Sources