1

我正在按照本教程安装 Velero 来备份我的集群。

我已成功安装 Minio 部署,但在安装 Velero 本身时遇到问题。

当我运行命令时:

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

我不断收到此错误:

CustomResourceDefinition/backups.velero.io: attempting to create resource
An error occurred:
Error installing Velero. Use `kubectl logs deploy/velero -n velero` to check the deploy logs: Error creating resource CustomResourceDefinition/backups.velero.io: the server could not find the requested resource

当我输入kubectl logs命令时,我得到这个:

ubuntu@kubemaster:~$ kubectl logs deploy/velero -n velero
Error from server (NotFound): deployments.apps "velero" not found

我错过了什么吗?

4

1 回答 1

1

在您提到的文章中,您获取并安装minio 1.1.0版本。

curl -LO https://github.com/heptio/velero/releases/download/v1.1.0/velero-v1.1.0-linux-amd64.tar.gz
tar -C /usr/local/bin -xzvf velero-v1.1.0-linux-amd64.tar.gz
export PATH=$PATH:/usr/local/bin/velero-v1.1.0-linux-amd64/

同时你在命令中使用 aws 插件--plugins velero/velero-plugin-for-aws:v1.0.0


根据在 openshift 3.11 上创建 CRD 时出错中评论

对于 v1.1,您不需要使用外部 AWS 插件,它仍然在树中。请确保您遵循您正在使用的 Velero 版本的正确文档:https ://velero.io/docs/v1.1.0/aws-config/

通过打开 1.1.0 aws 配置的文档,您会看到命令中没有使用插件参数velero install(顺便说一下,在中篇文章中也是如此)。

velero install \
    --provider aws \
    --bucket $BUCKET \
    --secret-file ./credentials-velero \
    --backup-location-config region=$REGION \
    --snapshot-location-config region=$REGION

所以可能是版本问题。认为您应该使用较新的 velero 版本,或者根据旧文档配置不带插件的 aws。

于 2021-11-24T09:36:00.150 回答