Skip to content

Latest commit

 

History

History
87 lines (63 loc) · 2.24 KB

velero.md

File metadata and controls

87 lines (63 loc) · 2.24 KB

VMware Tanzu Velero

Velero 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.

Latest version of Velero

Velero's own documentation

Deploy Velero

  1. Create and Change directory to infrastructure/base/velero

  2. Create namespace.yaml

kubectl create namespace velero
  1. Create helmrepository.yaml
flux create source helm vmware-tanzu \
    --url=https://vmware-tanzu.github.io/helm-charts \
    --interval=1h \
    --export > helmrepository.yaml
  1. Create helmrelease.yaml
flux create helmrelease velero \
    --source=HelmRepository/vmware-tanzu \
    --chart=velero \
    --chart-version=">=5.2.0-0" \
    --release-name=velero \
    --target-namespace=velero \
    --interval=1h \
    --values=./values.yaml \
    --export > helmrelease.yaml
  1. Create kustomization.yaml
kustomize create --autodetect
  1. Commit your changes to Git

Configuring AWS Backup Storage Location

  1. Create a S3 bucket

  2. Create an IAM user

  3. Configure the backup storage location - Velero Docs

velero install \
    --provider aws \
    --plugins velero/velero-plugin-for-aws:v1.8.2 \
    --bucket $BUCKET \
    --backup-location-config region=$REGION \
    --snapshot-location-config region=$REGION \
    --secret-file ./credentials-velero

Create a Backup Schedule

Velero Docs

velero schedule create <SCHEDULE_NAME> \
    --schedule="@every 24h" \
    --include-namespaces <NAMESPACES> \
    --exclude-namespaces <NAMESPACES> \
    --ttl 72h0m0s

If you wish to backup all namespaces, you can use the --all-namespaces flag instead of --include-namespaces and --exclude-namespaces.

velero schedule create <SCHEDULE_NAME> \
    --schedule="@every 24h" \
    --all-namespaces \
    --ttl 72h0m0s