AKS/EKS Backup Failing with "FailedValidation" Due to Inaccessible Backup Location

Why does my scheduled backup fail with a "FailedValidation" error?

Issue Description:

When attempting to perform a scheduled backup within Automation Suite on an Azure Kubernetes Service (AKS) or Elastic Kubernetes Service (EKS) cluster, a "FailedValidation" error may occur. This error suggests that the backup process is unable to access the specified backup location. The issue may arise from a bug in the backup store configuration in which the 'default-bs1' BACKUPSTORAGELOCATIONS object is not marked as default.

Resolution:

To resolve this issue, follow these steps:

  1. Identify the Backup Location:
    • Verify the backup storage locations configured for Velero by running the following command:
      • kubectl get backupstoragelocations -n velero
      • image.png
        • note the empty value under the 'default' column
  2. Modify the Backup Location:
    • If you notice that the default column is not set, you need to modify the backup locations in the Velero configuration to set the value
      • kubectl edit backupstoragelocation default-bs1 -n velero
      • Add 'default: true' under the 'spec' section and save
        • "apiVersion": "velero.io/v1",
          "kind": "BackupStorageLocationList",
          "metadata": {
            "name": "default-bs1"
            "namespace": "velero"
          },
          "spec": {
            "default": true,  ############### Add 
            "backupSyncPeriod": "1m0s",
            "objectStorage": {
              "bucket": "asbackup"
            }....
  3. Apply the Changes:
    • Once you have set the backup storage location to default, save the changes and apply them to the Velero configuration by deleting the Velero pods or performing a rolling restart of the Velero deployment.
      • kubectl delete pod -n velero --all
  4. Retry the Backup:
    • Verify the backup storage locations configured for Velero by running the following command:
      • kubectl get backupstoragelocations -n velero
      • image.png
        • Note that the 'PHASE' status is now set to 'Available,' with a 'Yes' value under the DEFAULT column.