To enable Read Write Many (RWX) storage on STACKIT SKE clusters follow this guide to install Rancher Lognhorn.
- Access to an SKE Cluster
- Helm & Kubectl installed
- (Optional) S3 Object Storage to store Backups
First we need to setup an Iscsi watchdog Daemonset that is starting the necessary services on the node.
kubectl create namespace iscsi-node
kubectl apply -f enableISCSI.yml
https://longhorn.io/docs/latest/deploy/install/install-with-helm/
helm repo add longhorn https://charts.longhorn.io
helm repo update
helm install longhorn longhorn/longhorn --namespace longhorn-system --create-namespace -f values.yaml --version $(curl -s https://api.github.com/repos/longhorn/longhorn/releases/latest | jq -r '.tag_name')
To use the install command provided here you need to have
curl
andjq
installed
Optional: Add the
values.yaml
to enable the backup and prepare parameters during deployment. See backup section below
kubectl apply -f storageClass.yaml
kubectl apply -f example-rwx-deployment.yaml
If you enabled the Backup via the values.yaml
you can now configure the S3 Bucket and the Backup Job, otherwise you can skip this part.
https://longhorn.io/docs/latest/snapshots-and-backups/backup-and-restore/
kubectl create secret generic <name> \
--from-literal=AWS_ACCESS_KEY_ID=<s3-access-key> \
--from-literal=AWS_SECRET_ACCESS_KEY=<s3 secret key> \
--from-literal=AWS_ENDPOINTS='https://object.storage.eu01.onstackit.cloud' \
-n longhorn-system
kubectl apply -f recurringBackupJob.yaml