Adding custom driver to Flex Volume

How does one add a custom driver to Flex Volume storage plugin in Rancher 2.0 ? I am trying to add a CIFS driver using project “juliohm/kubernetes-cifs-volumedriver” . Any help to get this done will be very helpful. Thanks.

1 Like

I am facing exactly the same issue.
Did you managed to solve it?

Per this GitHub issue and per my inspection, the /var/lib/kubelet directory is already mounted on the host so the location of the volume plugins is be /var/lib/kubelet/volumeplugins.

I installed the plugin with this:

mkdir -p /var/lib/kubelet/volumeplugins/juliohm~cifs
curl -o /var/lib/kubelet/volumeplugins/juliohm~cifs/cifs
chmod +x /var/lib/kubelet/volumeplugins/juliohm~cifs/cifs

Then created the secret for the CIFS mount, and a pod with the flex volume mount and all worked.

That’s with Rancher v2.0.6.


Note: with juliohm/kubernetes-cifs-volumedriver I had issues with the umount not working when deleting a pod. But with fstab/cifs it works perfectly.


I could finally manage it with this driver: (


Is there any way to use rke for copying the fstab/cifs files to the master and nodes? Or does this have to be a manual step after using rke to start the cluster?