Cannot mount EFS Persistent Volume Claim using EKS on fargate.

0

I am trying to run Jenkins on EKS using fargate. However I cannot seem to create a PVC using EFS.

Here are the events from the jenkins pod.

Events:
  Type     Reason          Age                   From               Message
  ----     ------          ----                  ----               -------
  Normal   LoggingEnabled  6m27s                 fargate-scheduler  Successfully enabled logging for pod
  Normal   Scheduled       5m39s                 fargate-scheduler  Successfully assigned jenkins/jenkins-0 to fargate-ip-10-0-7-124.ec2.internal
  Warning  FailedMount     80s (x10 over 5m35s)  kubelet            MountVolume.SetUp failed for volume "jenkins-pv" : rpc error: code = Internal desc = Could not mount "fs-0bd2e7d18591b22b0:fsap-032ece76764d4654a" at "/var/lib/kubelet/pods/3261817f-e563-464f-8f92-45047d39cad9/volumes/kubernetes.io~csi/jenkins-pv/mount": mount failed: exit status 32
Mounting command: mount
Mounting arguments: -t efs -o tls fs-0bd2e7d18591b22b0:fsap-032ece76764d4654a /var/lib/kubelet/pods/3261817f-e563-464f-8f92-45047d39cad9/volumes/kubernetes.io~csi/jenkins-pv/mount
Output: Could not start amazon-efs-mount-watchdog, unrecognized init system "bash"
b'mount.nfs4: mounting 127.0.0.1:fsap-032ece76764d4654a failed, reason given by server: No such file or directory'
Warning: config file does not have fips_mode_enabled item in section mount.. You should be able to find a new config file in the same folder as current config file /etc/amazon/efs/efs-utils.conf. Consider update the new config file to latest config file. Use the default value [fips_mode_enabled = False].Warning: config file does not have retry_nfs_mount_command item in section mount.. You should be able to find a new config file in the same folder as current config file /etc/amazon/efs/efs-utils.conf. Consider update the new config file to latest config file. Use the default value [retry_nfs_mount_command = True].

And the events from the PVC:

Events:
  Type    Reason                Age                From                         Message
  ----    ------                ----               ----                         -------
  Normal  ExternalProvisioning  12m (x2 over 12m)  persistentvolume-controller  Waiting for a volume to be created either by the external provisioner 'efs.csi.aws.com' or manually by the system administrator. If volume creation is delayed, please verify that the provisioner is running and correctly registered.

I understand that dynamic provisioning is not supported with Fargate which is why I am manually provisioning the PV and PVC. What am I missing?

1 Answer
0

Hi Jonathan, I haven't came across this error before, but I found a GitHub issue which suggests it can occur if the pod doesn't have the necessary IAM credentials (i.e. using IRSA). If so, that's a fairly cryptic error message but it could be worth double checking that's in place!

answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions