Skip to content

Support: Issue with using secret-based credentials #2452

Open
@0987363

Description

@0987363

/kind bug

What happened?

  • 3 EC2 servers, with 3 K3S master nodes deployed on them.
  • Pending when creating a volume.

How to reproduce it (as minimally and precisely as possible)?

  1. Create IAM user, attach permissions: AmazonEBSCSIDriverPolicy
  2. Create access credentials.
  3. helm install aws-ebs-csi-driver with config:
helm upgrade --install aws-ebs-csi-driver --namespace kube-system -f aws-iam-csi-driver-config.yml aws-ebs-csi-driver/aws-ebs-csi-driver

# aws-iam-csi-driver-config.yml
awsAccessSecret:
  name: aws-secret
  keyId: REDACTED
  accessKey: REDACTED
controller:
  region: ap-northeast-1
  sdkDebugLog: true
  logLevel: 7
node:
  logLevel: 7
  1. Use example: https://github.com/kubernetes-sigs/aws-ebs-csi-driver/tree/master/examples/kubernetes/dynamic-provisioning
  2. ebs-csi-controller keeps reporting errors:
    E0428 10:12:28.020560 1 driver.go:108] "GRPC error" err="rpc error: code = Internal desc = Could not create volume \"pvc-dcfaffc6-28de-4dab-aae8-4f5e1e71287e\": could not create volume in EC2: operation error EC2: CreateVolume, get identity: get credentials: failed to refresh cached credentials, no EC2 IMDS role found, operation error ec2imds: GetMetadata, http response error StatusCode: 404, request to EC2 IMDS failed

Anything else we need to know?:

  • I tried setting the EC2 hop limit to 2, but the problem persists.
  • I tried setting the config:hostNetwork to true, but the problem persists.
awsAccessSecret:
  name: aws-secret
  keyId: REDACTED
  accessKey: REDACTED
controller:
  region: ap-northeast-1
  sdkDebugLog: true
  logLevel: 7
node:
  logLevel: 7
  hostNetwork: true

Environment

  • Kubernetes version (use kubectl version):
Client Version: v1.32.3+k3s1
Kustomize Version: v5.5.0
Server Version: v1.32.3+k3s1
  • Driver version:
    v1.42.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.kind/supportCategorizes issue or PR as a support question.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions