I have successfully installed the AWS EBS CSI driver to my EKS cluster.
This is meant to be using the "IAM Role for Service Account" technique.
I am trying to utilise the checkout example app that AWS have given here The pod will not come up (pending) and the PVC is showing this:
Name: ebs-claim
Namespace: test
StorageClass: ebs-sc
Status: Pending
Volume:
Labels: app=ebs-claim
com.mylabel.contact=dl-myteam.dlonp1
Annotations: volume.beta.kubernetes.io/storage-provisioner: ebs.csi.aws.com
volume.kubernetes.io/selected-node: ip-10-232-100-115.ec2.internal
Finalizers: [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
VolumeMode: Filesystem
Used By: meme-ebs
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning ProvisioningFailed 27s persistentvolume-controller storageclass.storage.k8s.io "ebs-sc" not found
Normal Provisioning 8s (x4 over 25s) ebs.csi.aws.com_ebs-csi-controller-6dfdb77cdf-fbsbz_1760973c-09bb-43ab-b005-ffcd818447fc External provisioner is provisioning volume for claim "test/ebs-claim"
Warning ProvisioningFailed 5s (x4 over 22s) ebs.csi.aws.com_ebs-csi-controller-6dfdb77cdf-fbsbz_1760973c-09bb-43ab-b005-ffcd818447fc failed to provision volume with StorageClass "ebs-sc": rpc error: code = Internal desc = Could not create volume "pvc-05efbff8-9506-4003-9bab-e1ce4719bc1c": could not create volume in EC2: NoCredentialProviders: no valid providers in chain
caused by: EnvAccessKeyNotFound: failed to find credentials in the environment.
SharedCredsLoad: failed to load profile, .
EC2RoleRequestError: no EC2 instance role found
caused by: EC2MetadataError: failed to make EC2Metadata request
Similar to an issue I saw here, but had no answers.
Can anyone suggest things to try? Seems like the IAM role is not wired thru to the API that mounts the volume on EC2?