marcel-dempers / docker-development-youtube-series

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MountVolume.SetUp failed for volume "jenkins" - role s not authorized to perform: elasticfilesystem:DescribeMountTargets

jbpadilha opened this issue · comments

Hello

I'm facing one issue during Jenkins deployment in the pod.
Apparently, the role is not set to elasticfilesystem:DescribeMountTargets. Does anyone faced the same issue?

`Events:
Type Reason Age From Message


Normal Scheduled 7m18s default-scheduler Successfully assigned jenkins/jenkins-755df69664-279s6 to ip-192-168-83-52.ca-central-1.compute.internal
Warning FailedMount 59s (x11 over 7m17s) kubelet MountVolume.SetUp failed for volume "jenkins" : rpc error: code = Internal desc = Could not mount "fs-022497d2da99cd928:/" at "/var/lib/kubelet/pods/aa09bb27-3be5-41dd-86a8-4ac5484b0e01/volumes/kubernetes.io~csi/jenkins/mount": mount failed: exit status 1
Mounting command: mount
Mounting arguments: -t efs -o tls fs-022497d2da99cd928:/ /var/lib/kubelet/pods/aa09bb27-3be5-41dd-86a8-4ac5484b0e01/volumes/kubernetes.io~csi/jenkins/mount
Output: Failed to resolve "fs-022497d2da99cd9277.efs.ca-central-1.amazonaws.com". The file system mount target ip address cannot be found, please pass mount target ip address via mount options.
User: arn:aws:sts::054550991362:assumed-role/eksctl-reelcruit-eks-cluster-node-NodeInstanceRole-1AEPZZE5D06NE/i-0f83f000ca47c460a is not authorized to perform: elasticfilesystem:DescribeMountTargets on the specified resource
Warning FailedMount 43s (x3 over 5m15s) kubelet Unable to attach or mount volumes: unmounted volumes=[jenkins], unattached volumes=[jenkins kube-api-access-hhp87]: timed out waiting for the condition`

Solved this issue adding the permission to manage EKS into the role

Great to see you solved it, yes depending on cloud provider and storage you may need to configure that storage and access permissions outside of Kubernetes