在 Azure AKS 上安装 heptio ark (velero) 时出错

error while installing heptio ark (velero) on Azure AKS

我正在尝试为我的一个 k8s 集群安装 heptio velero(以前称为 Ark)。

我采取了以下步骤
A]安装先决条件。 原始 yaml 文件 here

B]安装秘密

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]应用剩余的k8s资源

这些文件是

卷快照位置的内容

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

和备份存储位置

---
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]我在查看日志时发现以下错误

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

我很确定错误是由于您将整数而非字符串传递给 apiTimeout,请尝试传递字符串:

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

Api spec 并且您的错误表明它正在寻找字符串