Velero | Storage Target Location Unavailable | Secret is missing data for key
search cancel

Velero | Storage Target Location Unavailable | Secret is missing data for key

book

Article ID: 389254

calendar_today

Updated On:

Products

VMware Tanzu Mission Control

Issue/Introduction

During the deployment of Velero plugins for Microsoft Azure, the following error is encountered:

level=error msg="Error getting a backup store" backup-storage-location=velero/azure-blob controller=backup-storage-location error="unable to get credentials: unable to get key for secret: "credentials" secret is missing data for key "bls"" error.file="/go/src/github.com/vmware-tanzu/velero/pkg/util/kube/secrets.go:47" error.function=github.com/vmware-tanzu/velero/pkg/util/kube.GetSecretKey logSource="pkg/controller/backup_storage_location_controller.go:137"

level=info msg="BackupStorageLocation is invalid, marking as unavailable" backup-storage-location=velero/azure-blob controller=backup-storage-location logSource="pkg/controller/backup_storage_location_controller.go:120"

level=error msg="Current BackupStorageLocations available/unavailable/unknown: 0/2/0, BackupStorageLocation "azure-blob" is unavailable: unable to get credentials: unable to get key for secret: "credentials" secret is missing data for key "bls")" controller=backup-storage-location logSource="pkg/controller/backup_storage_location_controller.go:178"

 

Environment

VMware Tanzu Mission Control

Cause

This issue occurs when the credentials-velero file is not correctly formatted. The correct format should be:

cat << EOF > ./credentials-velero
AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID}
AZURE_TENANT_ID=${AZURE_TENANT_ID}
AZURE_CLIENT_ID=${AZURE_CLIENT_ID}
....

....
EOF

Common mistakes include:

  • Formatting the file in JSON instead of plain text.
  • Adding unnecessary characters such as {} or extra spaces.

Resolution

Ensure that the credentials-velero file is created exactly as described in the documentation. Avoid unnecessary formatting changes or additional characters that could cause the deployment to fail.

Additional Information

For further reference, check the official Velero documentation:

https://github.com/vmware-tanzu/velero-plugin-for-microsoft-azure