kubernetesamazon-eksamazon-efs

amazon-efs failed, reason given by server: No such file or directory


apiVersion: v1
kind: PersistentVolume
metadata:
    name: ****-pv-public
    namespace: ****
spec:
    storageClassName: efs-sc
    capacity:
        storage: 3Gi
    accessModes:
        - ReadWriteMany
    persistentVolumeReclaimPolicy: Retain
    csi:
        driver: efs.csi.aws.com
        volumeHandle: fs-***
        volumeAttributes:
            path: /***/public
Mounting arguments: -t efs -o tls fs-2f974c54:/****/public /var/lib/kubelet/pods/9784d80e-4678-4b0b-96ae-a5cccf7db7a0/volumes/kubernetes.io~csi/******/mount
Output: Could not start amazon-efs-mount-watchdog, unrecognized init system "aws-efs-csi-dri"
b'mount.nfs4: mounting 127.0.0.1:/****/public failed, reason given by server: No such file or directory'

Solution

  • Here, how I fixed it first, create an access point

    apiVersion: v1
        kind: PersistentVolume
        metadata:
            name: **-pv-public
            namespace: laravel-test
        spec:
            storageClassName: efs-sc
            capacity:
                storage: 3Gi
            accessModes:
                - ReadWriteMany
            persistentVolumeReclaimPolicy: Retain
            csi:
                driver: efs.csi.aws.com
                volumeHandle: fs-**::fsap-***
    

    and fs-::fsap-* (::) not (:)