A Kubernetes Velero backup is the difference between a cluster outage that costs you an afternoon and one that costs you your data, because Kubernetes itself does not back up your workloads for you. The etcd snapshot that many tutorials mention protects the control plane, but it does not give you a portable, namespace-scoped restore of deployments, services, ConfigMaps, and persistent volumes that you can replay into a different cluster. Velero fills that gap: it snapshots Kubernetes resources and persistent volume data into object storage, schedules those backups automatically, and restores them with a single command when a namespace is deleted, a cluster is rebuilt, or a bad deployment wipes state you cannot recreate. This guide installs Velero, runs a first backup and restore, schedules recurring backups, and covers the restore tests that make a backup plan trustworthy.
It helps to understand what Velero actually stores. A backup captures the Kubernetes API objects in scope, such as Deployments, Services, Secrets, ConfigMaps, and PersistentVolumeClaims, and, when a volume snapshot plugin is configured, the underlying persistent volume data as well. Without a snapshot plugin, Velero still backs up the objects but restores empty volumes, which is fine for stateless workloads and useless for a database. That distinction decides whether your restore is a real recovery or a convincing-looking empty shell, so this guide configures both layers and verifies the data, not just the objects. If you are still building cluster fundamentals, our guide to Kubernetes resource requests and limits pairs well with backup planning, because a restore that cannot schedule due to missing resources is a second outage in disguise.

Prerequisites
You need a Kubernetes cluster with kubectl configured, cluster-admin permissions, and an S3-compatible object storage bucket, such as AWS S3, MinIO, or another provider’s S3-compatible storage. Velero needs credentials with permission to read and write that bucket, and for volume snapshots it needs a snapshot plugin for your cloud provider or CSI snapshot support in your cluster. You should also have a test namespace with a small stateful workload you can afford to delete and restore, because this guide tests the restore rather than asking you to trust it. Velero 1.14 or newer and a cluster running a supported Kubernetes version are assumed; the install command below pins the provider plugin explicitly so you do not accidentally get a mismatched plugin version.
Kubernetes Velero Backup: Install Velero with Object Storage
Start by downloading the Velero CLI for your platform and creating a credentials file for object storage. Keep this file outside version control and restrict its permissions, because it contains a long-lived access key. The file format is a simple key-value pair, and Velero reads it during installation to create a Kubernetes Secret in the velero namespace.
velero version --client-only
cat > credentials-velero <<EOF
[default]
aws_access_key_id = YOUR_ACCESS_KEY
aws_secret_access_key = YOUR_SECRET_KEY
EOF
chmod 600 credentials-velero
Install Velero into the cluster, pointing it at your bucket and region. The –use-volume-snapshots flag enables volume snapshots where the provider plugin supports them, and –use-node-agent enables file-system backup for volumes that do not support snapshots, which covers the common case of a local or CSI volume without a snapshotter. Installation creates the velero namespace, the deployment, and the backup storage location, and it validates the bucket connection before reporting success.
velero install --provider aws --plugins velero/velero-plugin-for-aws:v1.10.0 --bucket velero-backups --secret-file ./credentials-velero --use-volume-snapshots --use-node-agent --backup-location-config region=us-east-1
Confirm that the deployment is running and that the backup storage location reports as available. A location that reports unavailable usually means a wrong region, a bucket that does not exist, or credentials without write permission, and it is far better to discover that now than during an incident. The official Velero documentation on basic installation and backup storage locations lists the provider-specific flags for Azure, GCP, and other providers if your storage is not S3.
kubectl -n velero get pods
kubectl -n velero get backupstoragelocations
velero backup-location get
Kubernetes Velero Backup: Run, Schedule, and Restore
Create your first backup for a single namespace, then watch it until it completes. Velero reports progress through its own CLI and through Kubernetes custom resources, so velero backup describe shows the phases, any warnings, and the volume snapshot results. A backup that completes with warnings deserves the same attention as a failure: warnings often mean a resource was skipped, and a skipped resource can be the one you needed.
velero backup create app-backup --include-namespaces app
velero backup describe app-backup
velero backup logs app-backup
Schedule recurring backups so that a manual backup is not your only copy. A daily schedule with a retention period keeps storage costs bounded while giving you a recent restore point, and including cluster-scoped resources only when you need them keeps the backup small and fast. Retention is enforced by Velero itself: expired backups and their snapshots are deleted automatically, so set the time-to-live deliberately rather than letting backups accumulate forever.
velero schedule create app-daily --schedule="0 2 * * *" --include-namespaces app --ttl 720h
velero schedule get
Now test the restore, which is the only part of this guide that actually proves the plan. Delete the test namespace, restore from the backup into a new namespace, and verify both the objects and the data. Restoring into a different namespace with –namespace-mappings avoids clobbering the original and lets you compare the restored workload side by side with production before you trust it.
kubectl delete namespace app
velero restore create --from-backup app-backup --namespace-mappings app:app-restored
velero restore describe app-restored
kubectl -n app-restored get pods,svc,pvc
For workloads that span namespaces or depend on cluster-scoped resources, see our guide to Kubernetes StatefulSets for databases, which explains how persistent identity and storage interact with a restore.
Kubernetes Velero Backup: Selective Backups and Exclusions
Not every namespace deserves the same backup policy. System namespaces such as kube-system can usually be recreated by reinstalling the cluster components, while application namespaces with databases need frequent, snapshot-enabled backups. Use label selectors to back up only workloads that carry a backup label, and exclude namespaces that hold ephemeral test data. This keeps backup size and restore time proportional to what actually matters, and it prevents a restore from resurrecting test resources into a production cluster by accident.
velero backup create labelled-backup --selector app=payments
velero backup create full-backup --exclude-namespaces kube-system,velero
kubectl label namespace app backup=true
Also plan for the secrets problem honestly: Velero backs up Secrets in scope, which means your backup bucket contains sensitive material and must be protected with the same care as the cluster itself. Enable bucket encryption, restrict bucket access to the Velero credentials and a break-glass administrator, and consider whether secrets should be restored from a dedicated secrets manager instead of from the backup. A backup that anyone on the team can download is not a backup, it is a credential leak with a schedule.
Troubleshooting
When a backup stays in progress or fails, start with velero backup describe and velero backup logs, which usually name the failing resource or the storage error directly. Storage permission errors are the most common cause: the credentials need s3:GetObject, s3:PutObject, and s3:DeleteObject on the bucket, plus snapshot permissions for the provider plugin, and a missing permission fails the backup late rather than at install time. Volume snapshots that never complete usually mean the CSI snapshot controller is not installed, or the volume’s StorageClass has no VolumeSnapshotClass; install the snapshot controller and create a VolumeSnapshotClass for that driver before retrying. If a restore creates pods that stay pending, check resource requests against the target cluster capacity and check that the StorageClass referenced by the restored PVC exists in the target cluster, because a PVC bound to a missing class will never bind.
A restore that succeeds but serves stale or empty data almost always means volume snapshots were not enabled or not supported for that volume type, so the objects restored but the data did not. Check the backup description for the snapshot list before assuming the data is there, and enable the node agent file-system backup for volumes without snapshot support. If Velero itself is down during an incident, remember that backups are ordinary objects in your bucket: you can reinstall Velero pointing at the same bucket and location, and it will discover the existing backups, which is exactly why the bucket, not the cluster, is the real source of truth.
Conclusion
A Kubernetes Velero backup plan is only as good as its last tested restore. Install Velero with a real bucket and snapshot support, schedule backups with a deliberate retention period, restore into a separate namespace and verify the data, protect the bucket as carefully as the cluster, and repeat the restore test after every major cluster change. Do that, and a deleted namespace or a failed cluster becomes a recoverable incident with a known procedure, instead of a scramble to remember what the cluster used to contain.