0
votes

I deployed efs-provisioner to mount aws-efs in k8s as pvc. Then I'm getting "no volume plugin matched" error while creating pvc.

$ kubectl describe pvc efs -n dev
Name:       efs
Namespace:  dev
StorageClass:   aws-efs
Status:     Pending
Volume:     
Labels:     <none>
Annotations:    volume.beta.kubernetes.io/storage-class=aws-efs
Capacity:   
Access Modes:   
Events:
  FirstSeen LastSeen    Count   From                SubObjectPath   Type        Reason          Message
  --------- --------    -----   ----                -------------   --------    ------          -------
  32m       2m      21  persistentvolume-controller         Warning     ProvisioningFailed  no volume plugin matched

 kind: StorageClass
 apiVersion: storage.k8s.io/v1
 metadata:
   name: aws-efs
 provisioner: kubernetes.io/aws-efs

efs-provisioner-dep.yml at https://raw.githubusercontent.com/kubernetes-incubator/external-storage/master/aws/efs/deploy/deployment.yaml

1
Do you have the EFS provisioner running in your cluster? Is the RBAC config correct?mdaniel
@MatthewLDaniel Yes. efs-provisioner pod is up and running along RBAC. I followed the steps given in efs-provisioner github repo.hariK
Do the efs-provisioner logs have anything interesting to say? And what about the logs of the controller-manager(s)?mdaniel
[efs-provisioner logs] "Started provisioner controller kubernetes.io/aws-efs_efs-provisioner-7cc9c8fbff-lqxhw_0b01d56f-207b-11e9-8184-0a5864600209!" ---------- [controller-mnanager logs] "error finding provisioning plugin for claim acdc-dev/efs: no volume plugin matched I0127 20:33:04.230303 1 event.go:221] Event(v1.ObjectReference{Kind:"PersistentVolumeClaim", Namespace:"acdc-dev", Name:"efs", UID:"8da02cd5-2272-11e9-9eec-0693f1251186", APIVersion:"v1", ResourceVersion:"527618", FieldPath:""}): type: 'Warning' reason: 'ProvisioningFailed' no volume plugin matched" @MatthewLDanielhariK
Can you update your question with the output of kubectl get -o yaml storageclass aws-efs and similarly with deploy efs-provisionermdaniel

1 Answers

1
votes

I know this bit old and efs provisioner is officially deprecated. But still see some of the clusters and customers using it. I had the same issue and spend quite sometime troubleshooting it and I believe this can be helpful to someone who got the same issue.

I faced the issue after upgrading the efs provisoner to the latest numbered version which is v2.4.0 which can be found here

It was exactly went to the state as described in the question after the upgrade but I can confirm that it has started working after reverting back to the old version in my case v0.1.2.

After spending sometime, carefully analyzing the answers in this github issue I was able to fix it with below changes.

  1. Changing the StorageClass prvisioner from kubernetes.io/aws-efs to something else such as example.com/aws-efs
  2. Updating the efs provisioner deployment with the updated provisioner as below in the environment variables
         env:
           - name: FILE_SYSTEM_ID
             value: "{{ .Values.efs_fs_id }}"
           - name: AWS_REGION
             value: "{{ .Values.region }}"
           - name: PROVISIONER_NAME
             value: "example.com/aws-efs"

Make sure to delete the previous StorageClass with kubernetes.io/aws-efs before create the new one with the updated provisioner.

I hope this helps. Thanks.