title | menuTitle | description | weight | disableToc | tags | |||
---|---|---|---|---|---|---|---|---|
Kahu Deployment Guide |
Deployment Guide |
Deployment guide for the Kahu (Container Data Backup & Restore) project |
20 |
false |
|
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)
- Kahu deployment is done in its own namespace. Default namespace choosen is "kahu" which can be changed. So "kahu" namespace to be created before deploying kahu services
kubectl create namespace kahu
- Clone kahu repository to get deploy related files
git clone https://github.com/soda-cdm/kahu.git
- Deploy kahu custom resource definitions (CRD)
cd kahu/config/crd/v1beta1/bases/
kubectl apply -f .
- Kahu controller service watches on Kubernetes csi snapshot related CRD's. So these CRDs need to be installed as well.
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
- Create nfs server deployment
kubectl apply -f nfs-server-deployment.yaml
- Create nfs provider deployment
cd ../nfsprovider/
kubectl apply -f nfs-provider-deployment.yaml
- Finally, create kahu controller service to enable backup and restore controlers
cd ../controllers/
kubectl apply -f backup_restore_controllers.yaml
- Verify state of kahu microservices after deployment
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
- Create openebs zfs volume provider deployment
kubectl create -f https://raw.githubusercontent.com/soda-cdm/kahu/main/deploy/volumeprovider/openebs-zfs-provider-deployment.yaml
- Verify the state of deployment and ensure it is running
kubectl get pods -n kahu | grep kahu-openebs-zfs-provider