kubernetes flexvolume plugin for cifs

6/30/2016

2.4 / coreos I've instructed the kubelet to read plugins from a writable dir ( in coreos the default destination is read-only ):

--volume-plugin-dir=/etc/kubelet-plugins/volumeplugins 

I've placed this handmade flexplugin

https://gist.github.com/fvigotti/65dc24b7f93074f1c59f81d0e3f31d04 (also contain pod for usage sample )

here:

/etc/kubelet-plugins/volumeplugins/fv~cifs/cifs

reloaded the kubelet ( done various tests, also restarted the node multiple times ) during kubelet bootstrap no message gets logged about loaded/errors-on volume plugins ( it is normal? )

anyway, when i create a pod that use the plugin I get this message logged :

volumes.go:132] Could not create volume builder for pod 98377409-3e1a-11e6-bb39-fa163e111b06: can't use volume plugins for test: no volume plugin matched

I don't know if the plugin is missing or the logged message isn't enought descriptive for the problem, also the documentation for the plugin is scarce, I suppose was an easy integration but at this point I don't know where to look to debug..

Thank you, Francesco

-- francesco
cifs
kubernetes

1 Answer

5/26/2017

this can help someone , (there was serious bug in my first attempt, the biggest blocking probably was wrong args parsing for the mount command.. )

I've made a version of the plugin that works on kubernetes cluster 1.6.x

https://github.com/fvigotti/cifs_k8s_plugin

have a nice day, Francesco

-- francesco
Source: StackOverflow