Velero is an open-source tool for safely backing up and restoring Kubernetes clusters — and recovering them after disaster. On AWS, Velero stores cluster backups in an S3 bucket and, optionally, snapshots your persistent volumes to disk. This is a quick tour of installing it, taking backups, restoring, and scheduling.
Velero can be installed into the cluster (via its CLI or a Helm chart) in a velero namespace. Once installed, confirm the components are running:
kubectl get all -n veleroNext, establish the connection between the cluster and the S3 bucket (and disk, if you need volume backups). This requires an AWS credentials file. The velero install command wires it all together:
velero install \
--provider aws \
--image velero/velero:v1.8.0 \
--plugins velero/velero-plugin-for-aws:v1.4.0 \
--bucket <bucket_name> \
--secret-file <path_to_credentials_file> \
--use-volume-snapshots=false \
--backup-location-config region=<bucket_region>Set --use-volume-snapshots=true if you need to snapshot persistent volumes as well as cluster objects. Leave it false to back up Kubernetes resources only.
Back up the whole cluster — or scope it to a single namespace with -n:
# back up the whole cluster
velero backup create t2
# back up a single namespace
velero backup create t2 -n <namespace>These backups live in the S3 bucket and are available to restore from if the cluster is destroyed, a deployment fails, or a release introduces a bug.
Provided the connection between EKS and the S3 bucket is established, restoring is a single command referencing an existing backup:
velero restore create <restore_name> --from-backup <backup_name>Velero can run backups automatically on a schedule. A label selector scopes which resources the scheduled backup covers, and the interval can be expressed in minutes, days, or months:
velero schedule create <schedule_name> \
--schedule="<cron_expression>" \
--selector app=<selector_name>The --schedule flag takes a standard cron expression made up of five fields:
| Field | Meaning | Range |
|---|---|---|
| 1 | Minute | 0–59 |
| 2 | Hour | 0–23 |
| 3 | Day of month | 1–31 |
| 4 | Month | 1–12 |
| 5 | Day of week | 0–6 (Sun–Sat) |
For example, --schedule="0 2 * * *" runs a backup every day at 2:00 AM, while --schedule="@every 6h" runs one every six hours.
Install Velero, point it at an S3 bucket, and you have on-demand cluster and namespace backups, one-command restores, and scheduled automated backups — a solid backup and disaster-recovery baseline for any EKS cluster.
BootLabs designs resilient, well-backed-up Kubernetes platforms for enterprises on AWS and beyond. If you're building out backup and disaster-recovery for your clusters, our platform team can help.
Talk to our platform engineering team — we design backup, disaster-recovery, and high-availability strategies for production Kubernetes.