Deploy

Deploy disaster recovery

Fury Kubernetes modules are deployed via the furyctl command line tool.

Packages are then customized with kustomize. It lets you create customized Kubernetes resources based on other Kubernetes resource files, leaving the original YAML untouched. To learn how to create you own customization layer with it, please see the kustomize repository.

Requirements

To deploy the Fury Kubernetes Disaster Recovey module, you need the following

  • Kubernetes >= v1.14.0
  • Furyctl package manager to install Fury packages >= v0.2.2
  • Kustomize >= v3.3.0
  • the prometheus-operator component from our Monitoring module already deployed. The prometheus-operator CRDs (Custom Resource Definition) deploy a ServiceMonitor definition which is a prerequisite for running Velero.

Velero deployments on cloud platforms require the prior configuration of cloud-credentials secretin the kube-system namespace. You can find a terraform module example, designed to create all necessary cloud resources for each supported cloud platform, in the specific sections below.

Compatibility

Module Version / Kubernetes Version 1.14.X 1.15.X 1.16.X 1.17.X 1.18.X
v1.2.0
v1.3.0
v1.3.1
v1.4.0
  • Compatible
  • Has issues
  • Incompatible

Deployment

To start using Fury Kubernetes Disaster Recovey, you need to use the furyctl and create a Furyfile.yml with the list of all the packages that you want to download.

You can download the packages for a full disaster recovery module including Velero with the cloud/on-prem specific package of your choice and Velero-restic using the following Furyfile.yml :

bases:
  - name: dr/velero
    version: "v1.4.0"

and execute

$ furyctl vendor

to download the packages under ./vendor/katalog/dr/velero/.

See furyctl documentation for details about Furyfile.yml format.

To deploy the packages to your cluster, define a kustomization.yaml as detailed below in each component's specific section.

Then, execute the following command:

$ kustomize build . | kubectl apply -f -

Velero on premises

The velero-on-prem feature deploys a MinIO instance in the same cluster as an object storage backend that Velero can use to store backup data.

Example kustomization.yaml file

namespace: kube-system

bases:
  - katalog/velero/velero-on-prem

The deployment order is managed by an initContainer that waits for a set of conditions. In this case, the Velero deployment waits for the MinIO instance to be fully configured and ready.

Please note that the MinIO server is running in the same cluster that is being backed up. The principal reason for this is to provide backup for manifests in the on-premises deployment.

Velero in AWS

The AWS deployment alternative requires the cloud-credentials secretconfig in the kube-system namespace. Here you can find a terraform module example designed to create all necessary cloud resources to make Velero work in AWS. See sections below for a basic outline of inputs and outputs:

Terraform Inputs

Name Description Type Default Required
backup_bucket_name Backup Bucket Name string n/a yes
env Environment Name string n/a yes
name Cluster Name string n/a yes
region AWS Region where colocate the bucket string n/a yes

Terraform Outputs

Name Description
backup_storage_location Velero Cloud BackupStorageLocation CRD
cloud_credentials Velero required file with credentials
volume_snapshot_location Velero Cloud VolumeSnapshotLocation CRD

Terraform Usage

module "velero" {
  source             = "../vendor/modules/aws-velero"
  name               = "my-cluster"
  env                = "staging"
  backup_bucket_name = "my-cluster-staging-velero"
  region             = "eu-west-1"
}

Kustomization

Now you can deploy Velero AWS:

Example kustomization.yaml file

namespace: kube-system

bases:
  - katalog/velero/velero-aws

More information about the AWS Velero Plugin

Velero in GCP

The GCP deployment alternative requires the cloud-credentials secretconfig in the kube-system namespace. Here you can find a terraform module example designed to create all necessary cloud resources to make velero work in GCP. See sections below for a basic outline of inputs and outputs:

Terraform Inputs

Name Description Type Default Required
backup_bucket_name Backup Bucket Name string n/a yes
env Environment Name string n/a yes
name Cluster Name string n/a yes
project GCP Project where colocate the bucket string n/a yes

Terraform Outputs

Name Description
backup_storage_location Velero Cloud BackupStorageLocation CRD
cloud_credentials Velero required file with credentials
volume_snapshot_location Velero Cloud VolumeSnapshotLocation CRD

Terraform Usage

module "velero" {
  source             = "../vendor/modules/gcp-velero"
  name               = "my-cluster"
  env                = "staging"
  backup_bucket_name = "my-cluster-staging-velero"
  project            = "sighup-staging"
}

Kustomization

Now you can deploy Velero GCP:

Example kustomization.yaml file

namespace: kube-system

bases:
  - katalog/velero/velero-gcp

More information about the GCP Velero Plugin

Velero in Azure

The Azure deployment alternative requires the cloud-credentials secretconfig in the kube-system namespace. Here can find a terraform module designed to create all necessary cloud resources to make velero work in Azure. See sections below for a basic outline of inputs and outputs:

Terraform Inputs

Name Description Type Default Required
aks_resource_group_name Resource group name of AKS cluster to backup string n/a yes
azure_cloud_name available azure_cloud_name values: AzurePublicCloud, AzureUSGovernmentCloud, AzureChinaCloud, AzureGermanCloud string "AzurePublicCloud" no
backup_bucket_name Backup Bucket Name string n/a yes
env Environment Name string n/a yes
name Cluster Name string n/a yes
velero_resource_group_name Resouce group in which to create velero resources string n/a yes

Terraform Outputs

Name Description
backup_storage_location Velero Cloud BackupStorageLocation CRD
cloud_credentials Velero required file with credentials
volume_snapshot_location Velero Cloud VolumeSnapshotLocation CRD

Terraform Usage

module "velero" {
  source                     = "../vendor/modules/azure-velero"
  name                       = "sighup"
  env                        = "production"
  backup_bucket_name         = "sighup-production-cluster-backup"
  aks_resource_group_name    = "XXX"
  velero_resource_group_name = "XXX"
}

Kustomization

Now you can deploy Velero Azure:

Example kustomization.yaml file

namespace: kube-system

bases:
  - katalog/velero/velero-azure

More information about the Azure Velero Plugin

Velero Restic

Velero supports increemental volume back up and restore for Kubernetes volumes with Velero-restic.

Velero-restic requires a running Velero deployment in your cluster. Velero-restic can be deployed both on-prem or on a cloud cluster. So feel free to deploy it with your prefered Velero deployment.

namespace: kube-system

bases:
  - katalog/velero/velero-aws
  - katalog/velero/velero-restic

More information about Velero Restic integration


Last modified 25.06.2020: Updating module references (82f9ca7)