You can use Velero to back up the kubernetes resources including persistent volumes data under specific namespaces.
Procedure
- Log in to the VMware Telco Cloud Automation web interface.
- Navigate to .
- Open the web terminal by clicking the Options (three dots) corresponding to the workload cluster you want to backup and then selecting Open Terminal.
- On the Web terminal, check the service health of Velero by running the following command:
# kubectl get pod -n velero
# kubectl get bsl -n velero
- Set an environmental variable to exclude the cluster resources from backing up.
# export TCA_VELERO_EXCLUDE_RESOURCES="issuers.cert-manager.io,certificates.cert-manager.io,certificaterequests.cert-manager.io,gateways.networking.x-k8s.io,gatewayclasses.networking.x-k8s.io"
- Back up specific namespaces.
# velero backup create <example-backup> --exclude-resources $TCA_VELERO_EXCLUDE_RESOURCES --include-namespaces <example-namespaces-by-comma>
- Check backup status and upload CR and wait until the processes are"Completed".
# velero backup get // check the backup status
# kubectl get uploads -n velero // get the upload-name
# kubectl get uploads <upload-name> -o yaml // check the uploads status in yaml output