Cluster component
Velero
Backs up and restores the whole cluster; database backups don't need it.
- Memory when idle
- about 30 MiB
- CI measures it once the app is ready and before any traffic. Leave room for more.
- Tested on
- x86 and ARM servers
- Installed by default
- Optional
Introduction
Velero backs up Kubernetes objects and volume files to S3-compatible storage, and restores them. Install it when you want to back up and restore whole projects. Database backups don’t need it.
Velero is bound to cluster-admin. It reads and restores every object in the cluster, so only administrators should use it. By default no Pod is privileged. CSI snapshots are off. Velero copies volume files with Kopia, and only when you turn on the fileBackup input. Velero stores Secrets in a backup as they are, so the install generates two keys. One is the Kopia repository password. The other is a key that the S3 server uses to encrypt every backup object (SSE-C).
Before you install
Prepare an S3 bucket outside this cluster. If you store backups in the cluster, losing the cluster also loses the backups. Then collect these inputs:
bucket: the bucket name.s3Url: the S3 endpoint URL. Use HTTPS, and use storage that supports SSE-C.region: the bucket’s region. The default isus-east-1.credentials: the bucket’s keys as an AWS-style credentials file, with a[default]profile that setsaws_access_key_idandaws_secret_access_key.fileBackup: leave itfalseunless you need volume files in backups. Whentrue, a node agent runs as root on every node, mounts host paths and holds Velero’s token, and theveleronamespace must allow the privileged Pod Security level.
Use it
In Zeabur OSS, open Cluster → Backups to set the backup location and schedule, run a backup, and restore. See Back up a cluster and restore from a backup.
The two generated keys are also inside the backups they protect. Copy them out of the cluster now. Without them, no one can read your backups.
kubectl -n velero get secret velero-repo-credentials velero-backup-key -o yaml > velero-keys.yaml
Remove it
Removing Velero deletes its Deployment and the node agent, if you turned it on. Backups and restores stop. The CRDs, and the Backup, Schedule and Restore objects, stay in the cluster. The backups in your bucket and the generated keys stay too. Keep the keys: you need them to read old backups. Before you remove Velero, let running backups finish. See Remove components.
Troubleshooting
The backup location is not reachable
Check the location’s phase and message with kubectl -n velero get backupstoragelocations and kubectl -n velero describe backupstoragelocation default. Then check the bucket, endpoint, region and keys. Read Velero’s logs with kubectl -n velero logs deploy/velero.
A backup ends as PartiallyFailed
When fileBackup is false, a backup that asks for volume files can’t copy them, and it fails in part. Run kubectl -n velero get backups, then velero backup describe <backup> --details to see the failed items. Set fileBackup to true for the component, then run the backup again.
Technical details
This release
- Provides
- volume-backup
- Licence
- Apache-2.0
- Homepage
- velero.io
- Source file
- components/velero/component.yaml @ v0.6.3
Tested in CI
CI installs these exact files on a new cluster, waits until they are ready, then records the idle memory.
| Distribution | Platform | Kubernetes | Passed | Idle memory |
|---|---|---|---|---|
| k3s | linux/amd64 | v1.37.2 | 25 MiB | |
| k3s | linux/arm64 | v1.37.2 | 24 MiB | |
| kind | linux/amd64 | v1.37.0 | 24 MiB | |
| kind | linux/arm64 | v1.37.0 | 23 MiB | |
| kubesolo | linux/amd64 | v1.36.6 | 23 MiB | |
| kubesolo | linux/arm64 | v1.36.6 | 23 MiB | |
| rke2 | linux/amd64 | v1.37.2 | 25 MiB | |
| rke2 | linux/arm64 | v1.37.2 | 25 MiB |
Security
Bound to cluster-admin; reads and restores every object. By default no Pod is privileged and the velero namespace needs only the baseline Pod Security level. With the fileBackup input, a root node agent on every node holds the same token, mounts host paths and needs the privileged level.
What it installs
- velero 12.2.5