一、velero安装 1# wget https://github.com/vmware-tanzu/velero/releases/download/v1.11.1/velero-v1.11.1-linux-amd64.tar.gz 2# tar -zxvf velero-v1.11.1-linux-amd64.tar.gz 3# cp -av velero /usr/bin/ 4 5#velero -h 6# 启用命令补全 7# source <(velero completion bash) 8# velero completion bash > /etc/bash_completion.d/velero 1# cat > credentials-velero <<EOF 2[default] 3aws_access_key_id = admin 4aws_secret_access_key = P@ssw0rd 5EOF 6 7# velero install \ 8 --provider aws \ 9 --image velero/velero:v1.11.1 \ 10 --plugins velero/velero-plugin-for-aws:v1.6.0 \ 11 --bucket velero \ 12 --secret-file ./credentials-velero \ 13 --use-node-agent \ 14 --use-volume-snapshots=false \ 15 --namespace velero \ 16 --backup-location-config region=minio,s3ForcePathStyle="true",s3Url=http://192.168.31.110:9000 \ 17 --wait 18 19 --prefix /cce-test 二、卸载 1kubectl delete namespace/velero clusterrolebinding/velero 2kubectl delete crds -l component=velero 三、执行velero 备份与恢复 1# 不执行存储pvc内容……
阅读全文