velero Installation with Helm
Prerequisites
Helm Chart Reference
helm update
helm repo add vmware-tanzu https://vmware-tanzu.github.io/helm-charts/
helm repo update vmware-tanzu
velero-values.yaml (Local)
cat <<EOF > velero-values.yaml
initContainers:
- name: velero-plugin-for-aws
image: velero/velero-plugin-for-aws:v1.7.0
imagePullPolicy: IfNotPresent
volumeMounts:
- mountPath: /target
name: plugins
configuration:
defaultVolumesToFsBackup: true
backupStorageLocation:
- name: default
provider: aws
bucket: velero
accessMode: ReadWrite
default: true
config:
region: us-east-1
s3ForcePathStyle: true
s3Url: http://minio.minio-system.svc.cluster.local:9000
publicUrl: http://minio.minio-system.svc.cluster.local:9000
volumeSnapshotLocation:
- name: aws
provider: aws
config:
region: us-east-1
credentials:
useSecret: true
secretContents:
cloud: |
[default]
aws_access_key_id = {your-minio-access-key}
aws_secret_access_key = {your-minio-secret-key}
deployNodeAgent: true
EOF
velero-values.yaml (External)
cat <<EOF > velero-values.yaml
initContainers:
- name: velero-plugin-for-aws
image: velero/velero-plugin-for-aws:v1.7.0
imagePullPolicy: IfNotPresent
volumeMounts:
- mountPath: /target
name: plugins
configuration:
defaultVolumesToFsBackup: true
backupStorageLocation:
- name: default
provider: aws
bucket: velero
accessMode: ReadWrite
default: true
config:
region: us-east-1
s3ForcePathStyle: true
s3Url: http://192.168.0.101:9000
publicUrl: http://192.168.0.101:9000
volumeSnapshotLocation:
- name: aws
provider: aws
config:
region: us-east-1
credentials:
useSecret: true
secretContents:
cloud: |
[default]
aws_access_key_id = {your-minio-access-key}
aws_secret_access_key = {your-minio-secret-key}
deployNodeAgent: true
EOF
install
helm upgrade my-velero vmware-tanzu/velero \
--install \
--create-namespace \
--namespace velero \
-f velero-values.yaml
cli
wget https://github.com/vmware-tanzu/velero/releases/download/v1.10.3/velero-v1.10.3-linux-amd64.tar.gz
tar xvzf velero-v1.10.3-linux-amd64.tar.gz
sudo mv velero-v1.10.3-linux-amd64/velero /usr/local/bin
rm -rf ./velero-v1.10.3-linux-amd64
sdf
velero backup-location set aws --default
Log Check
kubectl logs deploy/my-velero -n velero
backupstoragelocations Check
kubectl get backupstoragelocations -n velero
Backup (non PV,PVC)
./velero backup create nfs-server \
--include-namespaces nfs-server \
--storage-location aws
Backup (Include PV,PVC)
./velero backup create nfs-server-backup \
--include-namespaces nfs-server \
--default-volumes-to-fs-backup \
--wait
Restore
./velero restore create \
--from-backup nfs-server-backup
Schedule
velero schedule create nfs-server --include-namespaces nfs-server --schedule="*/10 * * * *"
Velero CLI