Advanced
Searching inInstall guides
How to search
  • Paste an error message in quotes, e.g. "permission denied", to find the fix table that explains it.
  • Choose an area and a part of the guide (install, first settings, daily use, security, fixes) to go straight to the right step.
  • "two words" finds the exact phrase.
  • Plain words find names, texts and examples.
  • ↑ ↓ to move · Enter to open · Esc to close · / to search
Try:

Guide 88Velero · Kubernetes

Install and set up Velero (Kubernetes backup)

Velero backs up and restores Kubernetes: the objects (Deployments, Services, Secrets, CRDs …) and the data in persistent volumes, to S3-compatible storage. Use it for disaster recovery, to move apps between clusters, and before risky upgrades. This guide installs the Velero CLI and server with the AWS/S3 plugin (works with AWS S3, MinIO and other S3 storage), backs up volumes with the node agent (Kopia), creates schedules, restores to another namespace, and covers the errors you will see.

  • 9 Lessons
  • 5 Commands

$ run as a normal user# run as root (or with sudo)

88.1

Know it before you install

A Backup saves the Kubernetes objects (as JSON) to a BackupStorageLocation (a bucket) and the volume data either as cloud snapshots (VolumeSnapshotLocation / CSI) or with file-system backup by the node agent (Kopia). A Restore recreates the objects and data. A Schedule makes backups automatically with a TTL.

ItemValue
CLIvelero (from github.com/vmware-tanzu/velero/releases)
In the clusternamespace velero: the Velero Deployment + node-agent DaemonSet
Pluginsvelero/velero-plugin-for-aws (S3 and S3-compatible), Azure, GCP, CSI built in
Storagea bucket per cluster (or a prefix)
ObjectsBackup, Restore, Schedule, BackupStorageLocation, PodVolumeBackup

Remember

The plugin version must match the Velero version — check the compatibility table in the plugin's README.

88.2

Install the CLI (RHEL and Ubuntu)

VVER=v1.17.0
curl -fsSLO https://github.com/vmware-tanzu/velero/releases/download/$VVER/velero-$VVER-linux-amd64.tar.gz
tar -xzf velero-$VVER-linux-amd64.tar.gz
install -m 0755 velero-$VVER-linux-amd64/velero /usr/local/bin/velero
velero version --client-only

88.3

First configuration: install Velero in the cluster

Make a bucket (for example velero-prod on S3 or MinIO) and a user with rights only on it. Write its key to a local file (not in Git):

credentials-velero
[default]
aws_access_key_id = VELERO_ACCESS_KEY
aws_secret_access_key = VELERO_SECRET_KEY

Install, with file-system backup of volumes by the node agent:

velero install --provider aws --plugins velero/velero-plugin-for-aws:v1.13.0 --bucket velero-prod --secret-file ./credentials-velero --backup-location-config region=eu-central-1,s3ForcePathStyle=true,s3Url=https://s3.example.com:9000 --use-volume-snapshots=false --use-node-agent --default-volumes-to-fs-backup
rm ./credentials-velero
kubectl -n velero get pods
velero backup-location get
NAME      PROVIDER   BUCKET/PREFIX   PHASE       LAST VALIDATED
default   aws        velero-prod     Available   2026-11-17 10:02:11
OptionWhy
--provider aws + pluginS3 API (AWS or compatible like MinIO, Ceph).
s3ForcePathStyle, s3UrlNeeded for S3-compatible storage (not for AWS S3 itself).
--use-node-agent + --default-volumes-to-fs-backupBack up PV data with Kopia, works with any storage.
--use-volume-snapshots=falseNo cloud disk snapshots (on AWS/Azure/GCP you can use them instead).

On clouds with CSI snapshots, use --features=EnableCSI and VolumeSnapshotClasses instead of file-system backup for big volumes.

88.4

Back up and schedule

velero backup create shop-before-upgrade --include-namespaces shop --wait
velero backup describe shop-before-upgrade --details
velero backup logs shop-before-upgrade | tail
velero backup get
velero schedule create daily-all --schedule="0 2 * * *" --ttl 720h --exclude-namespaces kube-system,velero
velero schedule create hourly-shop --schedule="@every 1h" --include-namespaces shop --ttl 48h
velero schedule get

--ttl 720h keeps backups 30 days, then Velero deletes them (objects and data).

Commands in this lesson

88.5

Restore — and test restores

Restore into a new namespace to test without touching production:

velero restore create shop-test --from-backup shop-before-upgrade --namespace-mappings shop:shop-restore-test --wait
velero restore describe shop-test --details
kubectl -n shop-restore-test get pods,pvc
kubectl delete namespace shop-restore-test

Real disaster: install Velero on the new cluster pointing to the same bucket (read-only mode is good: velero backup-location set default --access-mode ReadOnly), then velero restore create --from-backup NAME. By default Velero does not overwrite objects that already exist.

Real uses at work:

  • Daily backups of all app namespaces (objects + volumes) with 30-day retention.
  • A backup right before cluster upgrades or big changes.
  • Moving apps to a new cluster (backup on old, restore on new).

88.6

Make it safe

Security checklist:

  • A dedicated bucket per cluster, its own user with rights only there; versioning/object lock on the bucket.
  • Backups contain Secrets — protect the bucket like a password store (encryption at rest, private network).
  • Test restores regularly (to a test namespace) — a backup you never restored is not proven.
  • Keep a copy of backups in another location/region (3-2-1).
  • Version-match Velero and plugins; upgrade them together.
  • Limit who can run velero restore (RBAC on the velero namespace).

88.7

Update and remove

Install the new CLI, then update the server and plugin images (as the upgrade notes say), for example:

kubectl -n velero set image deploy/velero velero=velero/velero:v1.17.1
kubectl -n velero set image ds/node-agent node-agent=velero/velero:v1.17.1
velero uninstall

velero uninstall removes Velero from the cluster; backups in the bucket stay.

88.8

Fix common problems

ProblemCauseFix
BackupStorageLocation UnavailableWrong bucket, credentials, s3Url, or TLS.kubectl -n velero logs deploy/velero; check the secret and URL; trust the CA (caCert in the location config).
Backup PartiallyFailedSome volume or object failed.velero backup describe NAME --details and velero backup logs NAME.
Volume data missing after restoreVolumes were not included (no fs-backup or snapshot).Use --default-volumes-to-fs-backup or annotate Pods; check PodVolumeBackup objects.
Plugin errors at startPlugin version does not match Velero.Use the plugin version from the compatibility table.
Restore skipped objects: "already exists"Objects are still in the cluster.Restore into a new namespace, or delete them first (carefully).
Node agent fails to back up a volumeThe Pod is not running or uses hostPath.Back up running Pods; hostPath volumes are not supported.

88.9

Next steps

1How do you test a restore without touching production?

Restore into a new namespace with --namespace-mappings shop:shop-restore-test.

2Why must the Velero bucket be protected like a password store?

Backups contain all Kubernetes Secrets of the backed-up namespaces.

All commands in this chapter