I am installing Velero in AKS.
Steps-
Velero(version 1.6.1) downloaded and unzipped it then moved it to the /usr/local/bin/
I have created Service Principle with the contributor role.
my credential-velero file-
AZURE_SUBSCRIPTION_ID=xxxxx-xxxxx-xxxxxxx-xxxxx
AZURE_TENANT_ID=xxxx-xxxxx-xxxxx-xxxxx-xxx
AZURE_CLIENT_ID=xxxx-xxxxxxx-xxxxx-xxxxx-xx
AZURE_CLIENT_SECRET=xxxx-xxxxx-xxxxx-xxxxx
AZURE_RESOURCE_GROUP=MC....
AZURE_CLOUD_NAME=AzurePublicCloud
Command I am using to install velero -
velero install \
--provider azure \
--plugins velero/velero-plugin-for-microsoft-azure:v1.2.0 \
--bucket velero \
--secret-file ./credentials-velero \
--backup-location-config resourceGroup=<RG name>,storageAccount=<storage acc name>[,subscriptionId=<subscription id>] \
--snapshot-location-config apiTimeout=5m[,resourceGroup=<RG name>,subscriptionId=<subscription id>]
Note- my RG is same for the AKS cluster and the backup storage account.
Error-
Phase for backup location is showing 'unknown'-
Logs of deployment -
time="2021-07-15T15:59:56Z" level=error msg="Error getting backup store for this location" backupLocation=default controller=backup-sync error="rpc error: code = Unknown desc = azure.BearerAuthorizer#WithAuthorization: Failed to refresh the Token for request to https://ma nagement.azure.com/subscriptions/xxxx-xxxxxx-xxxxx-xxxxx%5D/resourceGroups/myRG/providers/Microso ft.Storage/storageAccounts/storagename%5B/listKeys?%24expand=kerb&api-version=2019-06-01: StatusCode=401 -- Original Error: adal: Refre sh request failed. Status Code = '401'. Response body: {"error":"invalid_client","error_description":"AADSTS1080615: Invalid clie nt secret is provided.\r\nTrace ID: xxxx-xxxx-xxxxx-xxxxx\r\nCorrelation ID: xxxx-xxxx-xxxxxx-xxxx\r
\nTimestamp: 2021-07-15 15:59:56Z","error_codes":[7000215],"timestamp":"2021-07-15 15:59:56Z","trace_id":"xxxx-xxxx-xxxxx-xxxx ","correlation_id":"xxx-xxxx-xxxx-xxxx-xxx","error_uri":"https://login.microsoftonline.com/error?c ode=7000215"}" error.file="/go/src/velero-plugin-for-microsoft-azure/velero-plugin-for-microsoft-azure/object_store.go:217" error.funct ion=main.getStorageAccountKey logSource="pkg/controller/backup_sync_controller.go:175"
Can anyone help me to understand what I am missing in setup.