CodeBlanks Logo Icon CodeBlanks

Velero

Learn cluster backup with Velero.

Velero

Velero is a tool that backs up Kubernetes objects and volume data to object storage (S3, GCS, Azure Blob). It doesn't need etcd access; it works through the API, so it is used in managed clusters too. It backs up by namespace or label selection and takes volumes as disk snapshots or at file level (Kopia):

velero install --provider aws --plugins velero/velero-plugin-for-aws:v1.10.0 \
  --bucket yedek-tr --backup-location-config region=eu-central-1 \
  --secret-file ./velero-kimlik --use-node-agent

velero backup create magaza-elle --include-namespaces magaza
velero backup describe magaza-elle --details

Scheduled backups

velero schedule create defines regular backups with a cron expression; --ttl is the retention period:

$ velero schedule create gece --schedule="0 2 * * *" --include-namespaces magaza --ttl 720h
Schedule "gece" created successfully.
$ velero schedule get
NAME   STATUS    CREATED                         SCHEDULE    BACKUP TTL
gece   Enabled   2026-11-03 10:20:00 +0300 +03   0 2 * * *   720h0m0s

Practice Nightly backup

Write three commands: create a backup named magaza-elle for the magaza namespace; create a schedule named gece that backs up magaza every night at 02:00 ("0 2 * * *") and keeps it for 720 hours; list the schedules.

Starter code

terminal
# buraya yaz

Sample solution

terminal
velero backup create magaza-elle --include-namespaces magaza
velero schedule create gece --schedule="0 2 * * *" --include-namespaces magaza --ttl 720h
velero schedule get

Expected output

Backup request "magaza-elle" submitted successfully.
Schedule "gece" created successfully.
NAME   STATUS    CREATED                         SCHEDULE    BACKUP TTL
gece   Enabled   2026-11-03 10:20:00 +0300 +03   0 2 * * *   720h0m0s

Questions and answers

Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.

1 What is Velero's advantage over an etcd snapshot?

  • It only works on kubeadm
  • It backs up selectively at namespace level and also takes volume data Correct answer
  • It doesn't produce smaller files
  • It replaces etcd

Explanation: An etcd snapshot is always the whole cluster and doesn't include disks.

2 Limit the backup to the magaza namespace.

Question
velero backup create magaza-elle ____ magaza
Answer
velero backup create magaza-elle --include-namespaces magaza

Explanation: --include-namespaces backs up the selected namespaces.

3 Match.

Term Meaning
backup create One-off backup
schedule create Regular backup
--ttl Retention period
--use-node-agent File-level volume

All lessons in Expert