πŸ“šBook Signing at KubeCon EU 2026Meet us at Booking.com HQ (Mon 18:30-21:00) & vCluster booth #521 (Tue 24 Mar, 12:30-1:30pm) β€” free book giveaway!RSVP Booking.com Event
Configuration intermediate ⏱ 15 minutes K8s 1.28+

Kubernetes Backup and Restore with Velero

Backup and restore Kubernetes clusters with Velero. Covers namespace backups, scheduled backups, disaster recovery, and migration between clusters.

By Luca Berton β€’ β€’ πŸ“– 5 min read

πŸ’‘ Quick Answer: Backup and restore Kubernetes clusters with Velero. Covers namespace backups, scheduled backups, disaster recovery, and migration between clusters.

The Problem

This is one of the most searched Kubernetes topics. A comprehensive, well-structured guide helps engineers of all levels quickly find actionable solutions.

The Solution

Detailed implementation with production-ready examples below.

Install Velero

# Install CLI
brew install velero  # macOS
# or download from https://github.com/vmware-tanzu/velero/releases

# Install server (AWS example)
velero install \
  --provider aws \
  --plugins velero/velero-plugin-for-aws:v1.9.0 \
  --bucket my-velero-backups \
  --backup-location-config region=eu-west-1 \
  --snapshot-location-config region=eu-west-1 \
  --secret-file ./credentials-velero

Create Backups

# Backup entire cluster
velero backup create full-backup

# Backup specific namespace
velero backup create prod-backup --include-namespaces production

# Backup by label selector
velero backup create app-backup --selector app=web

# Scheduled backup (daily)
velero schedule create daily-backup \
  --schedule="0 2 * * *" \
  --include-namespaces production \
  --ttl 720h   # Keep for 30 days

# Check backup status
velero backup get
velero backup describe full-backup
velero backup logs full-backup

Restore

# Restore entire backup
velero restore create --from-backup full-backup

# Restore to different namespace
velero restore create --from-backup prod-backup \
  --namespace-mappings production:staging

# Restore specific resources
velero restore create --from-backup full-backup \
  --include-resources deployments,services,configmaps

# Check restore status
velero restore get
velero restore describe <restore-name>
graph LR
    A[Velero Server] -->|Backup| B[Object Storage - S3/GCS/Azure]
    A -->|Snapshot| C[Volume Snapshots - EBS/PD]
    D[velero restore] --> A
    A -->|Recreate| E[Kubernetes Resources]
    A -->|Restore| F[Persistent Volumes]

Frequently Asked Questions

Does Velero backup PVs?

Velero backs up PV metadata. For actual data, it uses volume snapshots (CSI or cloud-provider). For non-snapshot storage, use Velero’s File System Backup (restic/kopia).

Common Issues

Check kubectl describe and kubectl get events first β€” most issues have clear error messages pointing to the root cause.

Best Practices

  • Follow least privilege β€” only grant the access that’s needed
  • Test in staging before applying to production
  • Monitor and alert on key metrics
  • Document your runbooks for the team

Key Takeaways

  • Essential knowledge for Kubernetes operations
  • Start simple and evolve your approach
  • Automation reduces human error
  • Share knowledge with your team
#backup #restore #velero #disaster-recovery #migration #kubernetes
Luca Berton
Written by Luca Berton

Principal Solutions Architect specializing in Kubernetes, AI/GPU infrastructure, and cloud-native platforms. Author of Kubernetes Recipes and creator of CopyPasteLearn courses.

Kubernetes Recipes book cover

Want More Kubernetes Recipes?

This recipe is from Kubernetes Recipes, our 750-page practical guide with hundreds of production-ready patterns.

Luca Berton Ansible Pilot Ansible by Example Open Empower K8s Recipes Terraform Pilot CopyPasteLearn ProteinLens