UT CMP - RKE Migration - Backups
The following page is as as-built doc on setting up cluster wide backups in velero in the hopes of using those backups for some sort of cluster migration in the future.
Velero backups should be considered for longer term backups for kubernetes resources as well.
Setup
Velero has already been installed from work previously done to back up Harbor: https://cloud.wikis.utexas.edu/wiki/spaces/cws/pages/143689773
To start with, we’ll need a new S3 bucket to store these backups:
aws s3api create-bucket \
--bucket [CLUSTER_NAME]-k8s-backups \
--region us-east-1 \
--profile eis1-cmp-storage-[ENV] \
--no-cli-pagerIAM Policy:
Add permissions to the velero user previously made to allow them access to this bucket:
aws iam put-user-policy \
--profile eis1-cmp-storage-[ENV] \
--region us-east-1 \
--user-name velero \
--policy-name cmp-cluster-backups \
--policy-document file://velero-policy.jsonCreate a new Velero Backup location to use this backup:
Backup
To make a backup:
KUBECONFIG=~/.kube/utr-internal-sandbox.yml velero backup create backup-test --storage-location=[VELERO_BACKUP_LOCATION]This will back up everything in the cluster under a backup name backup-test
Backup names need to be unique, so lets suffix these with something like a timestamp.