Search code examples
azurebackupazure-aks

error while installing heptio ark (velero) on Azure AKS


I am trying to install heptio velero (earlier known as Ark) for one of my k8s clusters.

I took the following steps
A]install prereq. original yaml file here

enter image description here

B]install secrets

kubectl create secret generic cloud-credentials --namespace velero --from-literal AZURE_SUBSCRIPTION_ID="" --from-literal AZURE_TENANT_ID="" --from-literal AZURE_CLIENT_ID="" --from-literal AZURE_CLIENT_SECRET="" --from-literal AZURE_RESOURCE_GROUP="name-of-resource-group-where-my-vm etc created typically starts with MC_ in azure"

C]apply remaining k8s resources

enter image description here these files are enter image description here

the content of volume snapshot location

---
apiVersion: velero.io/v1
kind: VolumeSnapshotLocation
metadata:
  name: azure-default
  namespace: velero
spec:
  provider: azure
  config:
    apiTimeout: 30 

and backup storage location

---
apiVersion: velero.io/v1
kind: BackupStorageLocation
metadata:
  name: default
  namespace: velero
spec:
  provider: azure
  objectStorage:
    bucket: "<blob name for bucket>"" 
  config:
    resourceGroup: "<resource group name of my azure storage>" 
    storageAccount: "<storage account name >"

C]while looking at logs I found following error

Failed to list *v1.VolumeSnapshotLocation: 
v1.VolumeSnapshotLocationList.Items: 
[]v1.VolumeSnapshotLocation: v1.VolumeSnapshotLocation.Spec: 
v1.VolumeSnapshotLocationSpec.Config: ReadString: expects " or n, but found 3,error found in

Solution

  • I'm pretty sure the error is due to you passing integer, not string to the apiTimeout, try passing a string:

    apiVersion: velero.io/v1
    kind: VolumeSnapshotLocation
    metadata:
      name: azure-default
      namespace: velero
    spec:
      provider: azure
      config:
        apiTimeout: "30"
    

    Api spec and your error suggest its looking for a string