Velero is an open-source tool for backing up and restoring Kubernetes cluster resources and persistent volumes. It supports scheduled backups and disaster recovery workflows.
Prerequisites
- A running Kubernetes cluster on your Breeze instances
- An S3-compatible storage bucket for backup destination
- The
veleroCLI installed on your local machine
Install Velero CLI
wget https://github.com/vmware-tanzu/velero/releases/download/v1.13.0/velero-v1.13.0-linux-amd64.tar.gz
tar xzf velero-v1.13.0-linux-amd64.tar.gz
sudo mv velero-v1.13.0-linux-amd64/velero /usr/local/bin/
Configure Credentials
cat > /tmp/credentials-velero <<EOF
[default]
aws_access_key_id=YOUR_ACCESS_KEY
aws_secret_access_key=YOUR_SECRET_KEY
EOF
Install Velero in the Cluster
velero install \
--provider aws \
--plugins velero/velero-plugin-for-aws:v1.9.0 \
--bucket my-velero-backups \
--secret-file /tmp/credentials-velero \
--backup-location-config region=us-east-1,s3Url=https://s3.example.com \
--use-volume-snapshots=false
Create a Backup
velero backup create full-backup --include-namespaces default,production
velero backup describe full-backup
velero backup logs full-backup
Schedule Recurring Backups
velero schedule create nightly --schedule="0 1 * * *" --ttl 168h
Restore from Backup
velero restore create --from-backup full-backup
velero restore describe full-backup-restore
- Test restores regularly in a staging environment
- Set TTL to automatically expire old backups and reclaim storage