In this section we cover some of the available CSIs for Kubernetes that have been tested inside kluster-pi.
Based on the official documentation, the new longhorn CLI longhornctl
takes care of checking for preresquisites
and installing dependencies if missing.
Here are the instructions to perform the installation procedure by hands, or you can exec the practical resource/longhorn/install.sh
script which automates it.
VERSION="v1.7.1"
# Install Longhorn CLI to install dependencied and check them
curl -sSfL -o longhornctl https://github.com/longhorn/cli/releases/download/"${VERSION}"/longhornctl-linux-arm64
chmod +x longhornctl
# Check
./longhornctl check preflight
# and if everything is OK
./longhornctl install preflight
# Deploy
kubectl apply -f https://raw.githubusercontent.com/longhorn/longhorn/"${VERSION}"/deploy/longhorn.yaml
# Create basic auth secret to access UI
# Choose an USER and a PASSWORD
USER=<user> ; PASSWORD=<password> ; echo "${USER}:$(openssl passwd -stdin -apr1 <<< ${PASSWORD})" >> resources/longhorn/auth
kubectl -n longhorn-system create secret generic basic-auth --from-file=resources/longhorn/auth
# Deploy ingress to allow access UI
kubectl -n longhorn-system apply -f resources/longhorn/longhorn-ingress.yaml
https://github.com/topolvm/topolvm
The procedure for this resource can't be automated in the same way as the other at the moment, because it requires some prerequisites.
These prerequisites must either performed manually, executing the following procedure, or by running the resource/topolvm/prepare_node.sh
script.
Once the requirements are respected, topoLVM can be installed using its install.sh
script or the scripts/deploy-resources.sh
script.
These steps are required before the installation of topoLVM.
- lvm version 2.02.163 or later:
apt install lvm2
- a partition dedicated as a Physical Volume:
pvcreate /dev/sda3
- a Volume Group called
myvg1
created from the previous PV:
vgcreate myvg1 /dev/sda3
- a cert manager deployment:
export KUBECONFIG=${HOME}/.kube/kluster-pi-config
bash scripts/deploy-resources.sh -r cert-manager -v "v1.15.1"
- a namespace for topoLVM:
kubectl create ns topolvm-system
- labels on namespaces: https://github.com/topolvm/topolvm/blob/main/docs/getting-started.md
kubectl label namespace topolvm-system topolvm.io/webhook=ignore
kubectl label namespace kube-system topolvm.io/webhook=ignore
- the topoLVM repository installed in Helm:
helm repo add topolvm https://topolvm.github.io/topolvm
- the Helm repo updated:
helm repo update
- install through Helm:
helm install --namespace=topolvm-system topolvm topolvm/topolvm
- Verify the installation:
kubectl get pod -n topolvm-system