Velero (formerly Heptio Ark) gives you 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
Velero requires to have already deployed the prometheus-operator CRDs
as this feature deploys a ServiceMonitor
definition. It can be deployed using the
fury-kubernetes-monitoring KFD core module.
Every velero deployment, does not matter if on-premises or in any of the supported cloud, can configure schedules to back up all cluster manifests and/or cluster persistence volumes.
The velero-on-prem feature deploys a MinIO instance in the same cluster as object storage backend that Velero can use to store backup data.
Example kustomization.yaml
file
namespace: kube-system
bases:
- vendor/katalog/dr/velero/velero-base
- vendor/katalog/dr/velero/velero-on-prem
The AWS deployment alternative requires to have created cloud-credentials
secret in the
kube-system
namespace.
You can find a terraform module designed to create all necessary cloud resources
to make velero works in AWS.
You can find and example terraform project using the aws-velero terraform module here
$ cd examples/aws-example
$ terraform init
# omitted output
$ terraform apply --var="my_cluster_name=kubernetes-cluster-and-velero"
# omitted output
$ terraform output -raw cloud_credentials > /tmp/cloud_credentials.config
$ terraform output -raw volume_snapshot_location > /tmp/volume_snapshot_location.yaml
$ terraform output -raw backup_storage_location > /tmp/backup_storage_location.yaml
$ kubectl apply -f /tmp/cloud_credentials.config -n kube-system
# omitted output
$ kubectl apply -f /tmp/volume_snapshot_location.yaml -n kube-system
# omitted output
$ kubectl apply -f /tmp/backup_storage_location.yaml -n kube-system
# omitted output
Then, you will be able to deploy the velero AWS deployment.
Example kustomization.yaml
file
namespace: kube-system
bases:
- vendor/katalog/dr/velero/velero-base
- vendor/katalog/dr/velero/velero-aws
More information about the AWS Velero Plugin
The GCP deployment alternative requires to have created cloud-credentials
secret in the
kube-system
namespace.
You can find a terraform module designed to create all necessary cloud resources
to make velero works in GCP.
Then, you will be able to deploy the velero GCP deployment.
Example kustomization.yaml
file
namespace: kube-system
bases:
- vendor/katalog/dr/velero/velero-base
- vendor/katalog/dr/velero/velero-gcp
More information about the GCP Velero Plugin
The Azure deployment alternative requires to have created cloud-credentials
secret in the
kube-system
namespace.
You can find a terraform module designed to create all necessary cloud resources
to make velero works in Azure.
Then, you will be able to deploy the velero Azure deployment.
Example kustomization.yaml
file
namespace: kube-system
bases:
- vendor/katalog/dr/velero/velero-base
- vendor/katalog/dr/velero/velero-azure
More information about the Azure Velero Plugin
Important
Velero Restic has been renamed to Velero Node Agent in v2.2.0
Velero has support for backing up and restoring Kubernetes volumes using free open-source backup tools like restic and kopia.
velero-node-agent requires to have a velero deployment running in the cluster before deploy it. Velero Node Agent is not tied to be deployed on prem or on cloud. So feel free to deploy it with your prefered velero deployment.
namespace: kube-system
bases:
- vendor/katalog/dr/velero/velero-base
- vendor/katalog/dr/velero/velero-aws
- vendor/katalog/dr/velero/velero-node-agent
More information about Velero Node Agent integration
This module contains a couple of useful velero schedules to perform automatic backups of cluster manifests and/or persistence volumes.
Feel free to deploy these schedules if fits in your business:
namespace: kube-system
bases:
- vendor/katalog/dr/velero/velero-base
- vendor/katalog/dr/velero/velero-aws
- vendor/katalog/dr/velero/velero-schedules
More information about velero schedules
The snapshot-controller
module enables CSI Snapshot Data Movement support and is specifically designed to move CSI snapshot data to a backup storage location.
It requires requires a CSI driver to be installed on the underlying infrastructure, as Velero will use it to perform the data movement.
Example kustomization.yaml
file
namespace: kube-system
bases:
- vendor/katalog/dr/velero/velero-base
- vendor/katalog/dr/velero/velero-on-prem
- vendor/katalog/dr/velero/snapshot-controller