DEV Community

Cover image for A quick introduction to Velero
Sagar Jadhav
Sagar Jadhav

Posted on • Originally published at developersthought.in

A quick introduction to Velero

Introduction

  • Formerly known as "Heptio Ark"
  • It provides tools to Backup and Restore K8s cluster
  • It consists of the following components:
    • Server: Runs on K8s cluster
    • CLI: Runs locally
  • Current release: v1.5.x
  • GitHub stars: 4.6K+

Checkout here for more details

Architecture

Velero Architecture

Source: https://velero.io/docs/v1.5/img/backup-process.png

Velero supports the following operations:

  • On-demand backup
  • Scheduled backup
  • Restore

Each operation is a custom resource defined with the custom resource definition and stored in etcd. Velero has controllers that act on these resources.

On-demand backup

Creates a copy of k8s objects in the form of tarball and uploads that tarball to cloud object storage

Note: Backup operation is not atomic.

Scheduled backup

As the name suggests you can schedule the backup at a particular time. You can also schedule recurrent backups. Provide Cron expression to specify a schedule. For e.g. Use the 0 0 * * * Cron expression to take backup once a day.

Restore

Creates k8s objects from the definition stored in cloud object storage.

Note: As a good practice always set the mode of backup storage location to Read-Only during restore to avoid update or deletion of backup.

Velero uses cloud object storage as a source of truth. It synchronizes data between cloud object storage and the K8s cluster.

Features

  • Filtering k8s objects based on type, namespace & label during backup and restore
  • TTL (Time to Live) for backups. Backup resources will be deleted after TTL is reached
  • Different lifecycle hooks for both backup and restore operations
  • Supports namespace remapping i.e. K8s object from namespace A can be restored to namespace B

Top comments (2)

Collapse
 
muzammilaalpha profile image
muzammilaalpha

nice content

Collapse
 
sagarjadhv23 profile image
Sagar Jadhav

Thanks