EFS-CSI unable to mount path when using access points

2/6/2021

I'm trying to implement efs-csi driver using access points. I'm not sure how to troubleshoot this error.

apiVersion: v1
kind: PersistentVolume
metadata:
  name: efs-pv-jenkins
spec:
  capacity:
    storage: 100Mi
  volumeMode: Filesystem
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  storageClassName: efs-sc
  mountOptions:
    - tls
  csi:
    driver: efs.csi.aws.co
    volumeHandle: fs-xxxxad::fsap-xxxxxxx
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: jenkins-home
  namespace: jenkins
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: efs-sc
  resources:
    requests:
      storage: 100Mi
---
apiVersion: v1
kind: Pod
metadata:
  name: efs-app
  namespace: jenkins
spec:
  containers:
    - name: app
      image: centos
      command: ["/bin/sh"]
      args: ["-c", "while true; do echo $(date -u) >> /data-dir1/out.txt; sleep 5; done"]
      volumeMounts:
        - name: efs-volume-1
          mountPath: /dir1
  volumes:
    - name: efs-volume-1
      persistentVolumeClaim:
        claimName: jenkins-home

But this looks its failing

 Warning  FailedAttachVolume  82s    attachdetach-controller               AttachVolume.Attach failed for volume "efs-pv-jenkins" : attachdetachment timeout for volume fs-xxxxad::fsap-xxxxxxx
  Warning  FailedMount         79s    kubelet, ip-10-1xx-x-xx.ec2.internal  Unable to attach or mount volumes: unmounted volumes=[efs-volume-1], unattached volumes=[efs-volume-1 default-token-pq9mw]: timed out waiting for the condition
-- user6826691
amazon-efs
kubernetes

2 Answers

5/11/2021

As per the examples (https://github.com/kubernetes-sigs/aws-efs-csi-driver/tree/master/examples/kubernetes/access_points) and my experience, your volumeHandle looks fine.

I did notice that your csi driver looks to be incorrect. It should be efs.csi.aws.com

I tried replicating the incorrect csi driver and got a very similar timeout error.

-- Tom17
Source: StackOverflow

3/9/2021

There is a problem in your volumeHandle: fs-xxxxad::fsap-xxxxxxx , Generally valumeHandle accept mount path. so change volumeHandle: fs-xxxxad:/data-dir1 please refer https://github.com/kubernetes-sigs/aws-efs-csi-driver/blob/master/examples/kubernetes/volume_path/README.md

-- KARTHIK BAIRY
Source: StackOverflow