[Part-1]Velero Setup with Minikube and Minio

MouliVeera
2 min readJan 6, 2024

Velero is an open-source tool to safely backup and restore, perform disaster recovery, and migrate Kubernetes cluster resources and persistent volumes.

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

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.

Velero consists of:

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

Velero Setup with Minikube and Minio

This guide provides step-by-step instructions for setting up Velero with Minikube and Minio, enabling you to store backups in a local Minio instance.

Start Minikube in Your Local Environment

Ensure Minikube is running by checking its status:

minikube status

Create Velero Namespace

Create the Velero namespace using the following command:

kubectl create ns velero

Deploy Minio Resources to Velero Namespace

Deploy the necessary Minio resources to the Velero namespace:

kubectl create -f https://raw.githubusercontent.com/mouliveera/learn/main/Velero/minio/minio-distributed-statefulset.yaml-n velero
kubectl create -f https://raw.githubusercontent.com/mouliveera/learn/main/Velero/minio/minio-distributed-service.yaml -n velero
kubectl create -f https://raw.githubusercontent.com/mouliveera/learn/main/Velero/minio/minio-distributed-headless-service.yaml -n velero

1Velero Install

Use the velero install command to set up Velero:

velero install \
- provider aws \
- plugins velero/velero-plugin-for-aws:v1.2.1 \
- bucket velero \
- secret-file ./credentials-velero \
- use-volume-snapshots=false \
- backup-location-config region=minio,s3ForcePathStyle="true",s3Url=http://minio.velero.svc:9000

2Helm Install

  • Add the Velero Helm chart repository:
helm repo add vmware-tanzu https://vmware-tanzu.github.io/helm-charts
  • Create a dev-minio-values.yamlfile with the following content: Ref
configuration:
backupStorageLocation:
- bucket: velero
name: velero
provider: aws
prefix: backups
default: true
config:
region: minio
s3ForcePathStyle: true
s3Url: http://minio.velero.svc:9000
volumeSnapshotLocation:
- config:
region: minio
s3ForcePathStyle: true
s3Url: http://minio.velero.svc:9000
provider: aws
initContainers:
- name: velero-plugin-for-aws
image: velero/velero-plugin-for-aws:v1.8.1
volumeMounts:
- mountPath: /target
name: plugins
credentials:
useSecret: true
secretContents:
cloud: credentials-velero
  • Install Velero using Helm charts and the customized values file:
helm install velero vmware-tanzu/velero -n velero -f dev-minio-values.yaml
  • Check that Velero is up and running:
kubectl get deployment/velero -n velero
kubectl get pods -n velero

Refer to the official Velero documentation for more information: [Velero Documentation](https://velero.io/docs)

--

--

MouliVeera

Mouli is a seasoned DevOps Engineer with expertise in designing and optimising CI/CD pipelines, containerisation with Docker and Kubernetes.