在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你能帮助解决上面的错误吗?
发布于 2020-02-19 18:37:37
您的velero凭据文件应包含这些值,而不是占位符。
cat << EOF > ./credentials-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
EOFhttps://github.com/vmware-tanzu/velero-plugin-for-microsoft-azure#setup
发布于 2020-12-01 22:03:24
使用这种方式
AZURE_SUBSCRIPTION_ID=XXXX-XXXXX-XXXXXXX-XXXXXXX
AZURE_TENANT_ID=XXXX-XXXXX-XXXXXXX-XXXXXXX
AZURE_CLIENT_ID=XXXX-XXXXX-XXXXXXX-XXXXXXX
AZURE_CLIENT_SECRET=XXXXXXXXXXXXXXXXXX
AZURE_RESOURCE_GROUP=MC_RESOURCE_GROUP_NAME_OF_AKS # this should be the MC resource group
AZURE_CLOUD_NAME=AzurePublicCloud还可以尝试使用主映像
--set initContainers[0].image=velero/velero-plugin-for-microsoft-azure:master使用此格式
helm install velero vmware-tanzu/velero --namespace velero \
--set-file credentials.secretContents.cloud=./credentials-velero \
--set configuration.provider=azure \
--set configuration.backupStorageLocation.name=azure \
--set configuration.backupStorageLocation.bucket='velero' \
--set configuration.backupStorageLocation.config.resourceGroup=RESOURCE_GROUP_OF_STORAGEACCOUNT \
--set configuration.backupStorageLocation.config.storageAccount=STORAGE_ACCOUNT_NAME \
--set snapshotsEnabled=true \
--set deployRestic=true \
--set image.repository=velero/velero \
--set image.pullPolicy=Always \
--set initContainers[0].name=velero-plugin-for-microsoft-azure \
--set initContainers[0].image=velero/velero-plugin-for-microsoft-azure:master \
--set initContainers[0].volumeMounts[0].mountPath=/target \
--set initContainers[0].volumeMounts[0].name=pluginshttps://stackoverflow.com/questions/60298058
复制相似问题