kubernetes-csi / csi-driver-smb

This driver allows Kubernetes to access SMB Server on both Linux and Windows nodes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kubelet plugin registration hasn't successd yet, file=/var/lib/kubelet/plugins/smb.csi.k8s.io/registration doesn't exist.

lixianglong111 opened this issue · comments

What happened:
I tried to mount cifs server in k8s, after deploying several yaml files normally, StorageClass was created and PVC was created, csi-smb-controller was running normally and logs showed successful creation of PV. But after deploying nginx to mount on cifs it failed, checking logs I found that MountDevice failed to create newCsiDriverClient: driver name smb.csi.k8s.io not found in the list of registered CSI drivers.
I noticed that the node containers were restarting frequently, so I checked the logs and found that

  Type     Reason     Age                   From     Message

  Warning  Unhealthy  11m (x979 over 19h)   kubelet  (combined from similar events): Liveness probe failed: F0920 03:05:08.973460      17 main.go:160] Kubelet plugin registration hasn't succeeded yet, file=/var/lib/kubelet/plugins/[smb.csi.k8s.io/registration](http://smb.csi.k8s.io/registration) doesn't exist.
  Warning  BackOff    85s (x3984 over 19h)  kubelet  Back-off restarting failed container```

I've tried very many ways and looked at many issues and I can't solve the problem.

Environment:
- CSI Driver version: v1.12.0
- Kubernetes version (use kubectl version): Kubernetes Version: v1.22.0
- OS (e.g. from /etc/os-release): Kylin Linux V10
- Install tools: kubelet
- Others:

ok, The problem seems to have been solved.
To summarize, I looked at the default installed csi plugin in the cloud vendor and found that the mount path of csi-registrar for its csi plugin was different from the default path of the csi-node-driver-registrar configuration file. So I changed the path from the latter to the former and the problem was solved.

ok, The problem seems to have been solved. To summarize, I looked at the default installed csi plugin in the cloud vendor and found that the mount path of csi-registrar for its csi plugin was different from the default path of the csi-node-driver-registrar configuration file. So I changed the path from the latter to the former and the problem was solved.

@lixianglong111 thanks for the update, could you paste the change here? what needs to be changed for what cloud? thanks.