Kahu features can be realised through deployment on kubernetes(k8s) cluster. If you do not have a k8s cluster, please refer kubernetes setup documentation to setup one.
Note: Need to install the required things for nfs server on the k8s nodes (Example: sudo apt install nfs-kernel-server on ubuntu)
kubectl create namespace kahu
git clone https://github.com/soda-cdm/kahu.git
cd kahu/config/crd/v1beta1/bases/
kubectl apply -f .
Based on the kubernetes version, deploy the respective version of CustomResourceDefinition(CRD).
For version v1beta1:
cd ../../../../deploy/dependency/snapshotcrds/v1beta1
kubectl apply -f .
For version v1:
cd ../../../../deploy/dependency/snapshotcrds/v1
kubectl apply -f .
Kahu provides nfs as the default way for backing up metadata. For using nfs as the metadata backup provider, nfs server need to be up and running. This nfs server can be hosted anywhere and used provided it has connectivity and access with kahu provider.
Alternatively we can also host an nfs server inside cluster with below steps. Create a nfs service and extract service ip address
cd ../../../../deploy/yamls/nfsserver/
kubectl apply -f nfs-server-service.yaml
kubectl get service -n kahu | grep nfs-server
Edit nfs-pv.yaml to update NFS-SERVER-IP-ADDR with service ip address obtained in step 6
Create pv
kubectl apply -f nfs-pv.yaml
kubectl apply -f nfs-server-deployment.yaml
cd ../nfsprovider/
kubectl apply -f nfs-provider-deployment.yaml
cd ../controllers/
kubectl apply -f backup_restore_controllers.yaml
kubectl get pods -n kahu
For performing backup which involves volume, corresponding volume provider needs to be deployed.
For demonstration, we use OpenEBS ZFS CSI Driver for provisioning local PVs. To deploy OpenEBS ZFS CSI Driver and set it up for volume provisioning, please refer the documentation
Once it is completed, follow below steps
kubectl create -f https://raw.githubusercontent.com/soda-cdm/kahu/main/deploy/volumeprovider/openebs-zfs-provider-deployment.yaml
kubectl get pods -n kahu | grep kahu-openebs-zfs-provider