andyzhangx / kubernetes-drivers

This repository contains all Kubernetes volume drivers on Azure
MIT License
10 stars 1 forks source link

Error using plugin - fails to install on k8s 1.10.2 ? #9

Open ieugen opened 6 years ago

ieugen commented 6 years ago

Hello,

I'm trying to use this plugin to mount some SMB shares (storage boxes from Hetzner ) and I am getting the following errors.

I installed the plugin as a Daemon set and I also rebooted the node o it should be detected. Any ideas how I can move forward?

May 15 16:45:07 k8s-staging kubelet[896]: E0515 16:45:07.242688     896 desired_state_of_world_populator.go:293] Failed to add volume "test" (specName: "test") for pod "7b9e2eea-584e-11e8-a411-9600000a8664" to desiredStateOfWorld. err=failed to get Plugin from volumeSpec for volume "test" err=no volume plugin matched
root@k8s-staging ~ # kubectl get pv 
NAME              CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS     CLAIM                      STORAGECLASS   REASON    AGE
pv-cifs-flexvol   10Gi       RWX            Retain           Released   default/pvc-cifs-flexvol                            7m
root@k8s-staging ~ # kubectl get pvc
NAME               STATUS    VOLUME            CAPACITY   ACCESS MODES   STORAGECLASS   AGE
pvc-cifs-flexvol   Pending   pv-cifs-flexvol   0                                        3m

https://wiki.hetzner.de/index.php/Storage_Boxes/en

andyzhangx commented 6 years ago

How did you deploy k8s? On azure, the flexvolume plugins are all under /etc/kubernetes/volumeplugins/ while for other cloud, it's a different dir, you may refer to this guide to configure flexvolume plugins and also make sure jq(/usr/bin/jq) is installed on every agent node.

ieugen commented 6 years ago

I have deployed my cluster with kubeadm following official guide. I managed to use CIFS with [1] and the plugin directory is in /usr/libexec/kubernetes/kubelet-plugins/volume/exec/ - that guide mentioned it.

Also, it is usefull to mention that cifs-utils and jq are needed. I don't know about this plugin, but the daemonset can be removed after installation - at leaset with the other plugin,

[1] https://github.com/juliohm1978/kubernetes-cifs-volumedriver