【发布时间】:2020-06-03 11:41:44
【问题描述】:
在 Kubernetes 上使用 helm 图表安装 Velero 时,如下所示
helm install --namespace velero \
--set configuration.provider="Microsoft Azure" \
--set-file credentials.secretContents.cloud=<FULL PATH TO FILE> \
--set configuration.backupStorageLocation.name=azure \
--set configuration.backupStorageLocation.bucket=<BUCKET NAME> \
--set configuration.volumeSnapshotLocation.name=<PROVIDER NAME> \
--set configuration.volumeSnapshotLocation.config.region=<REGION> \
--set image.repository=velero/velero \
--set image.tag=v1.2.0 \
--set image.pullPolicy=IfNotPresent \
--set initContainers[0].name=velero-plugin-for-microsoft-azure:v1.0.0 \
--set initContainers[0].image=velero/velero-plugin-for-microsoft-azure:v1.0.0 \
--set initContainers[0].volumeMounts[0].mountPath=/target \
--set initContainers[0].volumeMounts[0].name=plugins \
stable/velero
我已经在 credential-velero 文件中配置了以下环境变量,并且在上面的命令中已经提供了路径。
凭证-velero 文件 -
AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID}
AZURE_TENANT_ID=${AZURE_TENANT_ID}
AZURE_CLIENT_ID=${AZURE_CLIENT_ID}
AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET}
AZURE_RESOURCE_GROUP=${AZURE_RESOURCE_GROUP}
AZURE_CLOUD_NAME=AzurePublicCloud
我遇到了错误 -
an error occurred: some backup storage locations are invalid: error getting backup store for location "default": rpc error: code = Unknown desc = unable to get all required environment variables: the following keys do not have values: AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_SUBSCRIPTION_ID
您能帮忙解决上述错误吗?
【问题讨论】:
-
提供者参数的值不正确。它必须是插件的名称,在本例中为
--provider azure。 -
另外,错误是提到
backup store for location "default",但是你已经配置了backupStorageLocation.name=azure。我建议您将 BSL 命名/重命名为default。发生这种情况是因为在此版本中,Velero 自动将“默认”BSL 的名称设置为default,当您没有具有该名称的 BSL 时,您会收到一些错误。
标签: azure kubernetes backup velero