Tutorial
This guide provides a step-by-step tutorial to get you started with Velero Operator.
Requirements
To follow this tutorial, you need access to a Kubernetes Juju controller, such as Microk8s.
Deploy Velero Operator
Add a new model to perform deployments:
juju add-model velero-tutorial
Deploy a velero-operator
and wait for the installation to complete:
juju deploy velero-operator --trust --config use-node-agent=true
Integrate with a storage provider
This tutorial uses the s3-integrator charm as the storage provider. Follow its documentation to set up the integrator with the AWS credentials. Once done, integrate it with Velero Operator:
juju deploy s3-integrator
juju integrate velero-operator s3-integrator
After completing these steps, you should have a model that resembles this:
Model Controller Cloud/Region Version SLA Timestamp
velero-tutorial microk8s microk8s/localhost 3.6.4 unsupported 21:25:24-04:00
App Version Status Scale Charm Channel Rev Address Exposed Message
s3-integrator active 1 s3-integrator latest/stable 145 10.152.183.77 no
velero-operator active 1 velero-operator 0 10.152.183.97 no Unit is Ready
Unit Workload Agent Address Ports Message
s3-integrator/0* active idle 10.1.27.231
velero-operator/0* active idle 10.1.27.203 Unit is Ready
Back up your data
Execute a backup via the Velero Command Line Interface (CLI) using the following action:
juju run-action velero/0 run-cli command="backup create mybackup --include-namespaces=test-namespace"
Get the backup details and status as follows:
juju run-action velero/0 run-cli command="backup describe mybackup"
Restore your data
You can restore your data from a previous backup as follows:
juju run-action velero/0 run-cli command="restore create --from-backup mybackup"
After the restore is complete, the charm recreates the namespace with all its resources. Confirm it by running:
kubectl get all -n test-namespace`
Clean up your tutorial environment
Release the allocated resources and delete the model for this tutorial as follows:
juju destroy-model velero-tutorial
Congratulations! Now you have a basic idea of how the Velero Operator charm works.