Kahu User Guide
Kahu features can be realised through deployment on kubernetes(k8s) cluster.
For kahu deployment steps and options, please refer deployment guide
Follow below steps to experience typical usecase which kahu provides
- Clone kahu project to get usage examples
git clone https://github.com/soda-cdm/kahu.git
cd kahu/examples
- Create backup location. In this example, backup location is created using nfs provider
kubectl create -f backuplocation.yaml
Typical usecases
Backup and restore applications at namespace scope
-
Create an application with its all resources at “deafult” namespace.
-
Create backup object at namespace level
kubectl apply -f backup-namespace.yaml
- Verify the state of backup object in the cluster
- Once the backup stage is “Finished”, restore an application from backup by creating restore object. Edit restore.yaml to update “backupName” and “namespaceMapping” with desired values. This sample yaml uses “restore-ns” as the namespace to restore resources of “default” namespace
kubectl apply -f restore.yaml
- Verify the state of restore object in the cluster
- Once the restore stage is “Finished”, verify the restore of application resources by checking resources as “restore-ns” namespace
kubectl get all -n restore-ns
Backup and restore a specific resource
-
Create 2 pods namely pod1234, pod5678 in “default” namespace
-
Create backup object to backup only pod1234
kubectl apply -f backup-specific-resource.yaml
- Verify the state of backup object in the cluster
- Once the backup stage is “Finished”, restore an application from backup by creating restore object. Edit restore.yaml to update “backupName” and “namespaceMapping” with desired values. This sample yaml uses “restore-ns” as the namespace to restore resources of “default” namespace
kubectl apply -f restore.yaml
- Verify the state of restore object in the cluster
- Once the restore stage is “Finished”, verify the restore of application resources by checking resources as “restore-ns” namespace.
Only pod1234 is expected to be restored back
kubectl get all -n restore-ns