Awesome
<!-- markdownlint-disable MD033 --> <h1> <img src="https://github.com/sighupio/fury-distribution/blob/main/docs/assets/fury-epta-white.png?raw=true" align="left" width="90" style="margin-right: 15px"/> Kubernetes Fury Disaster Recovery </h1> <!-- markdownlint-enable MD033 --> <!-- <KFD-DOCS> -->Kubernetes Fury Disaster Recovery (DR) implements backups and disaster recovery for the Kubernetes Fury Distribution (KFD) using Velero.
If you are new to KFD please refer to the official documentation on how to get started with KFD.
Overview
Kubernetes Fury DR module is based on Velero and Velero Node Agent.
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
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.
Packages
Kubernetes Fury DR provides the following packages:
Package | Version | Description |
---|---|---|
velero | 1.14.0 | Backup and restore, perform disaster recovery, and migrate Kubernetes cluster resources and persistent volumes. |
The velero package contains the following additional components:
Component | Description |
---|---|
velero-node-agent | Incremental backup and restore of Kubernetes volumes. |
velero-schedules | Common schedules for backup |
Integration with cloud providers
Use the following Velero Plugins to integrate Velero with cloud providers:
Plugin | Description |
---|---|
velero-aws | Plugins to support running Velero on AWS |
velero-gcp | Plugins to support running Velero on GCP |
velero-azure | Plugins to support running Velero on Azure |
Deploy the necessary infrastructure to persist the backups natively in cloud providers volumes, using the following terraform modules:
Terraform Module | Description |
---|---|
aws-velero | Creates AWS resources and Kubernetes CRDs to persist backups. |
azure-velero | Creates Azure resources and Kubernetes CRDs to persist backups. |
gcp-velero | Creates GCP resources and Kubernetes CRDs to persist backups. |
Compatibility
Kubernetes Version | Compatibility | Notes |
---|---|---|
1.25.x | :white_check_mark: | No known issues |
1.26.x | :white_check_mark: | No known issues |
1.27.x | :white_check_mark: | No known issues |
1.28.x | :white_check_mark: | No known issues |
1.29.x | :white_check_mark: | No known issues |
Check the compatibility matrix for additional information about previous releases of the modules.
Usage
Kubernetes Fury DR deployment depends on the environment.
Environment | Storage Backend | Velero Plugin | Terraform Module |
---|---|---|---|
Velero on AWS | S3 Bucket | velero-aws | aws-velero |
Velero on GCP | GCS | velero-gcp | gcp-velero |
Velero on Azure | AZ Storage Container | velero-azure | azure-velero |
Velero on-premises | MinIo | velero-on-prem | / |
Prerequisites
Tool | Version | Description |
---|---|---|
furyctl | >=0.25.0 | The recommended tool to download and manage KFD modules and their packages. To learn more about furyctl read the official documentation. |
kustomize | >=3.5.3 | Packages are customized using kustomize . To learn how to create your customization layer with kustomize , please refer to the repository. |
terraform | >=1.3 | Additional infrastructure is deployed using terraform . |
Velero on AWS
Velero on AWS is based on the AWS Velero Plugin.
It requires the secret cloud-credentials
in the kube-system
namespace containing a service account with appropriate credentials.
As an alternative, the module supports authentication via IAM Roles.
To deploy Velero on AWS:
- List the packages you want to deploy and their version in a
Furyfile.yml
bases:
- name: dr/velero/velero-aws
version: "v2.4.0"
- name: dr/velero/velero-node-agent
version: "v2.4.0"
- name: dr/velero/velero-schedules
version: "v2.4.0"
modules:
- name: dr/aws-velero
version: "v2.4.0"
See
furyctl
documentation for additional details aboutFuryfile.yml
format.
-
Execute
furyctl legacy vendor -H
to download the packages -
Inspect the downloaded packages under
./vendor/katalog/velero
. -
Deploy the necessary infrastructure via terraform using the
aws-velero
terraform module:
module "velero" {
source = "path/to/vendor/modules/aws-velero"
backup_bucket_name = "my-cluster-velero"
project = "sighup-staging"
}
More information on modules inputs can be found in the aws-velero module documentation
Here you can find an example designed to create all necessary cloud resources for Velero on AWS.
- Define a
kustomization.yaml
that includes the downloaded resources.
resources:
- ./vendor/katalog/dr/velero/velero-aws
- ./vendor/katalog/dr/velero/velero-node-agent
- ./vendor/katalog/dr/velero/velero-schedules
- To deploy the packages to your cluster, execute:
kustomize build . | kubectl apply -f -
Velero on GCP
Velero on GCP is based on the Velero GCP Plugin.
It requires the secret cloud-credentials
in the kube-system
namespace containing a service account with appropriate credentials.
As an alternative, the module supports workload identity.
Check the required Velero GCP plugin permissions here
To deploy Velero on GCP:
- List the packages you want to deploy and their version in a
Furyfile.yml
bases:
- name: dr/velero/velero-gcp
version: "v2.4.0"
- name: dr/velero/velero-node-agent
version: "v2.4.0"
- name: dr/velero/velero-schedules
version: "v2.4.0"
modules:
- name: dr/gcp-velero
version: "v2.4.0"
See
furyctl
documentation for additional details aboutFuryfile.yml
format.
-
Execute
furyctl legacy vendor -H
to download the packages -
Inspect the downloaded packages under
./vendor/katalog/velero
. -
Deploy the necessary infrastructure via terraform using the
gcp-velero
terraform module:
module "velero" {
source = "path/to/vendor/modules/gcp-velero"
backup_bucket_name = "my-cluster-velero"
project = "sighup-staging"
}
More information on modules inputs can be found in the gcp-velero module documentation
Here you can find an example designed to create all necessary cloud resources for Velero on GCP.
- Define a
kustomization.yaml
that includes the downloaded resources.
resources:
- ./vendor/katalog/dr/velero/velero-gcp
- ./vendor/katalog/dr/velero/velero-node-agent
- ./vendor/katalog/dr/velero/velero-schedules
- To deploy the packages to your cluster, execute:
kustomize build . | kubectl apply -f -
Velero on Azure
Velero on Azure is based on the Azure Velero Plugin.
Requires the cloud-credentials
secret
config in the kube-system
namespace.
To deploy Velero on Azure:
- List the packages you want to deploy and their version in a
Furyfile.yml
bases:
- name: dr/velero/velero-azure
version: "v2.4.0"
- name: dr/velero/velero-node-agent
version: "v2.4.0"
- name: dr/velero/velero-schedules
version: "v2.4.0"
modules:
- name: dr/azure-velero
version: "v2.4.0"
See
furyctl
documentation for additional details aboutFuryfile.yml
format.
-
Execute
furyctl legacy vendor -H
to download the packages -
Inspect the downloaded packages under
./vendor/katalog/velero
. -
Deploy the necessary infrastructure via terraform using the
azure-velero
terraform module:
module "velero" {
source = "path/to/vendor/modules/azure-velero"
backup_bucket_name = "my-cluster-velero"
project = "sighup-staging"
}
More information on modules inputs can be found in the azure-velero module documentation
Here you can find an example designed to create all necessary cloud resources for Velero on Azure.
- Define a
kustomization.yaml
that includes the downloaded resources.
resources:
- ./vendor/katalog/dr/velero/velero-azure
- ./vendor/katalog/dr/velero/velero-node-agent
- ./vendor/katalog/dr/velero/velero-schedules
- To deploy the packages to your cluster, execute:
kustomize build . | kubectl apply -f -
Velero on-premises
velero-on-prem deploys a MinIO in-cluster instance as an object storage backend for Velero.
Please note that the MinIO server is running in the same cluster that is being backed up.
To deploy velero on-prem
:
- List the packages you want to deploy and their version in a
Furyfile.yml
bases:
- name: velero/velero-on-prem
version: "v2.4.0"
- name: velero/velero-node-agent
version: "v2.4.0"
- name: velero/velero-schedules
version: "v2.4.0"
See
furyctl
documentation for additional details aboutFuryfile.yml
format.
-
Execute
furyctl legacy vendor -H
to download the packages -
Inspect the downloaded packages under
./vendor/katalog/velero
. -
Define a
kustomization.yaml
that includes the downloaded resources.
resources:
- ./vendor/katalog/dr/velero/velero-on-prem
- ./vendor/katalog/dr/velero/velero-node-agent
- ./vendor/katalog/dr/velero/velero-schedules
- To deploy the packages to your cluster, execute:
kustomize build . | kubectl apply -f -
<!-- Links -->
<!-- </KFD-DOCS> -->
<!-- <FOOTER> -->
Contributing
Before contributing, please read first the Contributing Guidelines.
Reporting Issues
In case you experience any problem with the module, please open a new issue.
License
This module is open-source and it's released under the following LICENSE
<!-- </FOOTER> -->