Can't install correctly smb-flexvol
SebastienHo opened this issue · 4 comments
What happened:
I intend to install smb-flexvol using th efollowing command :
kubectl apply -f https://raw.githubusercontent.com/Azure/kubernetes-volume-drivers/master/flexvolume/smb/deployment/smb-flexvol-installer.yaml
I have 4 pods created one is in bad state :
Can you help me?
looks like there is sth wrong with your cluster. And we suggest using https://github.com/kubernetes-csi/csi-driver-smb
Thanks Andy,
Using the plugin I was able to create the PV and the PVC
I am not able to use the volume within a deployment :
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app.kubernetes.io/name: publishing-orchestrator-job
app.kubernetes.io/version: "{version}"
app.kubernetes.io/component: web
app.kubernetes.io/environment: beta
name: publishing-orchestrator-job-deployment
namespace: beta
spec:
replicas: 1
template:
metadata:
name: publishing-orchestrator-job
labels:
app: publishing-orchestrator-job
name: publishing-orchestrator-job
spec:
containers:
- name: publishing-orchestrator-job
image: tracepartsdockerrepo.azurecr.io/moon-publishingorchestrator.job-beta:2020.3.365.2
imagePullPolicy: "Always"
ports:
- containerPort: 80
name: pod-port
env:
- name: ASPNETCORE_ENVIRONMENT
value: Beta
- name: DLL_NAME
value: PublishingOrchestrator.job.dll
volumeMounts:
- name: test
mountPath: /data
volumes:
- name: test
flexVolume:
driver: "microsoft.com/smb"
secretRef:
name: smbcreds
options:
source: "//172.16.1.43/publishingstudio$$"
mountoptions: "vers=2.0,dir_mode=0777,file_mode=0777"
I get the following message
MountVolume.MountDevice failed for volume "pv-smb" : rpc error: code = Internal desc = volume(publishingstudio_smb) mount "//172.16.1.43/publishingstudio$" on "/var/lib/kubelet/plugins/kubernetes.io/csi/pv/pv-smb/globalmount" failed with mount failed: exit status 32 Mounting command: mount Mounting arguments: -t cifs -o dir_mode=0777,file_mode=0777,vers=2.0,domain=172.16.1.30, //172.16.1.43/publishingstudio$ /var/lib/kubelet/plugins/kubernetes.io/csi/pv/pv-smb/globalmount Output: mount error(11): Resource temporarily unavailable Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Could you help me to understand what is wrong?
Regards,
Sébastien
to narrow down the issue, could you ssh to one agent node, and run
mkdir /tmp/cifs
mount -t cifs -o dir_mode=0777,file_mode=0777,vers=2.0,domain=172.16.1.30, //172.16.1.43/publishingstudio ... /tmp/cifs
Looks like there is sth wrong with your smb server.
also you can use this way to create a smb server on k8s cluster: https://github.com/kubernetes-csi/csi-driver-smb/tree/master/deploy/example/smb-provisioner, that may narrow down the issue.