Kahu Deployment Guide

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)

Deployment options

Install from source using deployment yamls :

  1. 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
  1. Clone kahu repository to get deploy related files
git clone https://github.com/soda-cdm/kahu.git
  1. Deploy kahu custom resource definitions (CRD)
cd kahu/config/crd/v1beta1/bases/
kubectl apply -f .
  1. 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 .
  1. 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.

  2. 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
  1. Edit nfs-pv.yaml to update NFS-SERVER-IP-ADDR with service ip address obtained in step 6

  2. Create pv

kubectl apply -f nfs-pv.yaml
  1. Create nfs server deployment
kubectl apply -f nfs-server-deployment.yaml
  1. Create nfs provider deployment
cd ../nfsprovider/
kubectl apply -f nfs-provider-deployment.yaml 
  1. Finally, create kahu controller service to enable backup and restore controlers
cd ../controllers/
kubectl apply -f backup_restore_controllers.yaml
  1. Verify state of kahu microservices after deployment
kubectl get pods -n kahu

Install volume backup provider

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

  1. Create openebs zfs volume provider deployment
kubectl create -f https://raw.githubusercontent.com/soda-cdm/kahu/main/deploy/volumeprovider/openebs-zfs-provider-deployment.yaml
  1. Verify the state of deployment and ensure it is running
kubectl get pods -n kahu | grep kahu-openebs-zfs-provider