Kubernetes Backup via Velero

This guide walks through the process of backing up a Kubernetes cluster to the decentralized cloud for multicloud Kubernetes architectures

Background

This guide walks through the process of backing up a Kubernetes cluster using Restic with Velero. Velero is a command-line tool that backs up Kubernetes clusters and restores them in case of loss. Velero includes a command-line interface and server-side component that runs inside of your Kubernetes cluster.

Velero lets you:

  • Take backups of your cluster and restore them in case of loss.

  • Migrate cluster resources to other clusters.

  • Replicate your production cluster to development and testing clusters.

An overview of the Kubernetes Connector

Prerequisites

  • Complete Velero Prerequisites and install the CLI: docs

  • Create a Storj Tardigrade account: docs

  • Created a project in the Tardigrade account: docs

  • Create an API key for the project: docs

  • Setup a Tardigrade Uplink CLI and create an access grant for the project: docs

  • Create a Tardigrade bucket where Velero will store the backups: docs

Instructions

Install Velero with Storj plugin

$ velero install --provider gcp \
--plugins jessgreb01/velero-plugin-for-storj:v0.0.2 \
--bucket $BUCKET \
--backup-location-config accessGrant=$ACCESS \
--no-secret

To generate an access grant ($ACCESS) for the configuration, follow the guide here: https://documentation.tardigrade.io/getting-started/sharing-your-first-object

Backup/Restore

Perform a backup:

$ velero backup create $BACKUP_NAME

Perform a restore:

$ velero restore create $RESTORE_NAME --from-backup $BACKUP_NAME

Note: it's possible to overwrite the backup location or access grant by editing the backupstoragelocations.velero.io CR and restarting the Velero Pod on the cluster in case of any mistake with the configuration.

The complete Velero documentation is located here.

Multicloud Architecture for Disaster Prevention and Migration

Because Tardigrade is a globally distributed hot object store, you can store and recover your Kubernetes volumes from anywhere in the world, instantly, without having to replicate data across regions. For DevOps managers, this can mean better resilience for your cluster, reduced global RTO (recovery time objective), cost-savings, and improved native security over centralized alternatives.

In the example below, we can see a Disaster Recovery scenario where we might need to migrate into a new cluster:

Tardigrade is a the ultimate tool for multicloud architectures

In this scenario, Cluster B is restored from the backup of A and reconstituting the Kubernetes volume in the cluster.

Github Source: