【问题标题】:Using EBS CSI Driver on an EKS private cluster在 EKS 专用集群上使用 EBS CSI 驱动程序
【发布时间】:2022-08-17 08:54:14
【问题描述】:

我正在尝试在 EKS 私有集群中使用 gp3 存储。存储类定义文件在公共 EKS 集群中进行了测试,运行良好。

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: sc-gp3
provisioner: ebs.csi.aws.com
volumeBindingMode: WaitForFirstConsumer
parameters:
  type: gp3
allowedTopologies:
- matchLabelExpressions:
  - key: topology.ebs.csi.aws.com/zone
    values: 
    - ap-southeast-2a
    - ap-southeast-2b
    - ap-southeast-2c

当我使用 StorageClass gp2 时,可以成功创建所有 pod。但是,一旦我将 StorageClass 更改为 sc-gp3,pvc 就会因以下事件而挂起。

Events:
  Type     Reason                Age               From                                                                                      Message
  ----     ------                ----              ----                                                                                      -------
  Normal   WaitForFirstConsumer  24s               persistentvolume-controller                                                               waiting for first consumer to be created before binding
  Warning  ProvisioningFailed    14s               ebs.csi.aws.com_ebs-csi-controller-697b8c7b66-lmhvk_368a005a-438f-4fb2-8062-223782880c6b  failed to provision volume with StorageClass \"sc-gp3\": rpc error: code = DeadlineExceeded desc = context deadline exceeded
  Normal   ExternalProvisioning  8s (x4 over 24s)  persistentvolume-controller                                                               waiting for a volume to be created, either by external provisioner \"ebs.csi.aws.com\" or manually created by system administrator
  Warning  ProvisioningFailed    3s                ebs.csi.aws.com_ebs-csi-controller-697b8c7b66-lmhvk_368a005a-438f-4fb2-8062-223782880c6b  failed to provision volume with StorageClass \"sc-gp3\": rpc error: code = Internal desc = Could not create volume \"pvc-de9b7509-285d-4ea4-843b-8e27951b7711\": could not create volume in EC2: RequestCanceled: request context canceled
caused by: context deadline exceeded
  Normal  Provisioning  1s (x3 over 24s)  ebs.csi.aws.com_ebs-csi-controller-697b8c7b66-lmhvk_368a005a-438f-4fb2-8062-223782880c6b  External provisioner is provisioning volume for claim \"app/app-storage\"

我已经添加了端点 com.amazonaws.ap-southeast-2.ec2、com.amazonaws.ap-southeast-2.sts 和 com.amazonaws.ap-southeast-2.ebs。不知道我是否错过了什么。

不确定我是否遗漏了什么?我该如何解决这个问题?

    标签: amazon-web-services amazon-eks


    【解决方案1】:

    是否已安装 CSI 驱动程序或插件本身? 以及它需要的所有必需的 IAM?

    我也在使用私有集群,它工作正常

    参考 https://github.com/kubernetes-sigs/aws-ebs-csi-driver

    【讨论】:

      猜你喜欢
      • 2023-02-20
      • 1970-01-01
      • 2021-06-01
      • 1970-01-01
      • 2021-11-06
      • 2023-01-24
      • 1970-01-01
      • 2020-04-29
      • 2022-08-22
      相关资源
      最近更新 更多