NOTE: This document is written with the focus to have a single document which can fit both new-comers to k8s ecosystem, and also those who know the system. If you are well versed with k8s yaml files, and can manage using 'kubectl' directly, you can use kadalu without python3 dependency, directly using yaml files. Check this document for more details.
Download the latest release of Kadalu Kubectl plugin using,
For using external gluster cluster volumes in HashiCorp Nomad, please refer Nomad folder in Kadalu repo
$ curl -fsSL https://github.com/kadalu/kadalu/releases/latest/download/install.sh | sudo bash -x
Test the version you installed is up-to-date and install Operator.
kubectl kadalu version
kubectl kadalu install
In the case of OpenShift, deploy Kadalu Operator using,
$ oc kadalu install --type=openshift
Note: Security Context Constraints can be applied only by admins, Run
oc login -u system:admin to login as admin
--local-csi-yaml options to use local yaml files instead of downloading the Operator and CSI yaml files from the internet.
kubectl kadalu install --local-yaml=./kadalu-operator.yaml --local-csi-yaml=./csi-nodeplugin.yaml
Identify the devices available from nodes and run the following command to add storage to Kadalu.
Note: if your host is running RHEL/CentOS 7.x series or Ubuntu/Debian older than 18.04, you may need to do below tasks before adding storage to kadalu.
$ # On CentOS7.x/Ubuntu-16.04
$ sudo dd if=/dev/zero of=/dev/sdc bs=512 count=1
$ sudo mkfs.xfs /dev/sdc
Once the device is ready, add it to kadalu pool. (note:
kube1 below is hostname, check yours by
kubectl get nodes).
$ kubectl kadalu storage-add storage-pool-1 --device kube1:/dev/sdc
Operator will start the storage export pods as required. And, in 2 steps, your storage system is up and running.
Check the status of Pods using,
$ kubectl get pods -n kadalu
NAME READY STATUS RESTARTS AGE
server-storage-pool-1-kube1-0 1/1 Running 0 84s
csi-attacher-0 2/2 Running 0 30m
csi-nodeplugin-5hfms 2/2 Running 0 30m
csi-nodeplugin-924cc 2/2 Running 0 30m
csi-nodeplugin-cbjl9 2/2 Running 0 30m
csi-provisioner-0 3/3 Running 0 30m
operator-6dfb65dcdd-r664t 1/1 Running 0 30m
After this, go ahead and create your PVC and attach it to other applications.