Skip to main content

SIGHUP Distribution Disaster Recovery

Overview​

SIGHUP Distribution DR module is based on Velero and Velero Node Agent.

Module's repository: https://github.com/sighupio/module-dr

Velero allows you to:

  • backup your cluster
  • restore your cluster in case of problems
  • migrate cluster resources to other clusters
  • replicate your production environment to development and testing environment.

Together with Velero, Velero Node Agent allows you to:

  • backup Kubernetes volumes
  • restore Kubernetes volumes

And by using the snapshot-controller, the support for CSI Snapshot Data Movement can be enabled, which allows you to:

  • backup the volume data to a pre-defined backup storage
  • have consistent backups of your data

The module contains also velero plugins to natively integrate with Velero with different cloud providers and use cloud provider's volumes as the storage backend.

Configuration​

You can customize the module using the spec.distribution.modules.dr object in the following way:

  • type: The type of the DR, must be none, or eks for the EKSCluster provider and on-premises for the other providers.
  • velero object: if type is not none, this object lets you customize some aspects of it.
    • backend: The storage backend type for Velero. minio (default) will use an in-cluster MinIO deployment for object storage, externalEndpoint can be used to point to an external S3-compatible object storage instead of deploying an in-cluster MinIO.
    • externalEndpoint: if you specified externalEndpoint as backend, you need to specify this object to provide the needed credentials to your S3-compatible bucket.
    • schedules object: Configuration for Velero's backup schedules.
      • ttl: The Time To Live (TTL) of the backups created by the backup schedules (default 720h0m0s, 30 days). Notice that changing this value will affect only newly created backups, prior backups will keep the old TTL.
      • install: Whether to install or not the default manifests and full backups schedules. Default is true.
      • cron.full and cron.manifests: The cron expression for the full and manifests backup schedules (default 0 1 * * * for full, */15 * * * * for manifests).

Introduction: Disaster Recovery in Kubernetes​

Disaster recovery (DR) is a critical process for ensuring business continuity in the face of unexpected events like hardware failures, cyberattacks, or natural disasters. A robust DR strategy involves preparing for data loss and system downtime by implementing tools and processes to restore normal operations quickly and reliably. Effective DR plans encompass backup and recovery, failover mechanisms, and testing to ensure preparedness.

In Kubernetes, disaster recovery presents unique challenges due to the dynamic, distributed, and ephemeral nature of containerized environments. A Kubernetes DR strategy should include:

  • Cluster State Backup: Saving resource definitions like deployments, services, and configurations.
  • Persistent Volume Backups: Ensuring that application data stored in persistent volumes is preserved.
  • Cross-Cluster Recovery: Enabling the restoration of workloads to a different cluster or cloud region in case of a total failure.

A comprehensive DR solution for Kubernetes must address both application data and the cluster's configuration state, ensuring seamless recovery.

SD: DR Module​

SD provides Velero to perform backups and store them safely.

SD will automatically install the appropriate Velero components based on the Provider of the cluster and the configuration you provide. More specifically:

  • OnPremises and Immutable: SD will install Velero, Velero Node Agent to perform backups for PVCs, and an optional MinIO instance to store the backups.
  • EKSCluster: SD will install Velero, and the velero-aws plugin to handle backups natively in AWS.

Regardless of the provider, SD creates two distinct types of backup:

  1. Manifests: it copies the manifests from the ETCD database.
  2. Full: it performs a full backup of PersistentVolumes that are currently used inside the cluster.

You can specify a retention period and a cron-like schedule for both of them. See more in the Provider's schema

Requirements​

This module requires the SD Monitoring module to be installed in the cluster, because it provides the ServiceMonitor CRD that Velero uses to install a ServiceMonitor definition.

Velero​

Velero (formerly Heptio Ark) gives you a tool to back up and restore your Kubernetes cluster resources and persistent volumes. You can run Velero with a cloud provider or on-premises. Velero lets you:

  • Take backups of your cluster and restore in case of loss.
  • Migrate cluster resources to other clusters.
  • Replicate your production cluster to development and testing clusters.

Velero consists of:

  • A server that runs on your cluster
  • A command-line client that runs locally

Read More​