【问题标题】:Invalid parameter key zone for CreateVolumeCreateVolume 的参数键区无效
【发布时间】:2023-02-23 23:12:51
【问题描述】:

我正在尝试使用 pvc 创建卷并不断收到以下错误:

W0223 08:14:27.125940       1 controller.go:934] Retrying syncing claim "32886053-35bc-4a85-8e19-da61fb64f946", failure 24
E0223 08:14:27.125957       1 controller.go:957] error syncing claim "32886053-35bc-4a85-8e19-da61fb64f946": failed to provision volume with StorageClass "performance-aws-scratch-1": rpc error: code = InvalidArgument desc = Invalid parameter key zone for CreateVolume
I0223 08:14:27.125970       1 event.go:285] Event(v1.ObjectReference{Kind:"PersistentVolumeClaim", Namespace:"aws-performance-ci-cd-pipeline", Name:"scratch0-0", UID:"32886053-35bc-4a85-8e19-da61fb64f946", APIVersion:"v1", ResourceVersion:"596060227", FieldPath:""}): type: 'Warning' reason: 'ProvisioningFailed' failed to provision volume with StorageClass "performance-aws-scratch-1": 
rpc error: code = InvalidArgument desc = Invalid parameter key zone for CreateVolume

这是我的存储类 yaml。我在 AWS 云上。 zone 对我来说似乎是正确的。

(base) % kubectl get storageclass performance-aws-scratch-1 -o yaml
allowVolumeExpansion: false
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"allowVolumeExpansion":false,"apiVersion":"storage.k8s.io/v1","kind":"StorageClass","metadata":{"annotations":{},"name":"performance-aws-scratch-1"},"parameters":{"csi.storage.k8s.io/fstype":"ext4","encrypted":"true","iopsPerGB":"1","type":"io1","zone":"us-east-1a"},"provisioner":"ebs.csi.aws.com","reclaimPolicy":"Delete","volumeBindingMode":"Immediate"}
  creationTimestamp: "2023-02-15T22:08:54Z"
  managedFields:
  - apiVersion: storage.k8s.io/v1
    fieldsType: FieldsV1
    fieldsV1:
      f:allowVolumeExpansion: {}
      f:metadata:
        f:annotations:
          .: {}
          f:kubectl.kubernetes.io/last-applied-configuration: {}
      f:parameters:
        .: {}
        f:csi.storage.k8s.io/fstype: {}
        f:encrypted: {}
        f:iopsPerGB: {}
        f:type: {}
        f:zone: {}
      f:provisioner: {}
      f:reclaimPolicy: {}
      f:volumeBindingMode: {}
    manager: kubectl-client-side-apply
    operation: Update
    time: "2023-02-15T22:08:54Z"
  name: performance-aws-scratch-1
  resourceVersion: "591236324"
  uid: a65feb4f-db14-4826-a38a-3df655cab3ff
parameters:
  csi.storage.k8s.io/fstype: ext4
  encrypted: "true"
  iopsPerGB: "1"
  type: io1
  zone: us-east-1a
provisioner: ebs.csi.aws.com
reclaimPolicy: Delete
volumeBindingMode: Immediate

任何指向可能出错的指针?

【问题讨论】:

    标签: kubernetes


    【解决方案1】:

    您在“参数”下指定了无效的密钥“区域”。尝试:

    ...
    parameters:
      csi.storage.k8s.io/fstype: ext4
      type: io1
      iopsPerGB: "1"
      encrypted: "true"
    allowedTopologies:
    - matchLabelExpressions:
      - key: topology.ebs.csi.aws.com/zone
        values:
        - us-east-1a
    provisioner: ebs.csi.aws.com
    reclaimPolicy: Delete
    volumeBindingMode: Immediate
    

    【讨论】:

      猜你喜欢
      • 2020-07-13
      • 2014-07-14
      • 2011-10-19
      • 2016-08-15
      • 2016-07-07
      • 2019-03-07
      • 2011-10-12
      • 2017-05-04
      • 2019-06-23
      相关资源
      最近更新 更多