0

I want to try out the csi smb driver in a local kind cluster, but I receive an error, where the local smb server cannot be found.

I followed the tutorial at the GitHub repository for installing the smb driver, a local smb server and using it with a storageclass

But when I provision a PVC, it fails with this error message:

failed to provision volume with StorageClass "smb": 
rpc error: code = Internal desc = failed to mount smb server: rpc error: 
code = Internal desc = volume(smb-server.default.svc.cluster.local/share#pvc-d886cbbb-a8a3-4411-9871-e089634ec50b#) mount "//smb-server.default.svc.cluster.local/share" on "/tmp/pvc-d886cbbb-a8a3-4411-9871-e089634ec50b" failed with mount failed: exit status 1 
Mounting command: mount Mounting arguments: -t cifs -o dir_mode=0777,file_mode=0777,uid=1001,gid=1001,<masked> //smb-server.default.svc.cluster.local/share /tmp/pvc-d886cbbb-a8a3-4411-9871-e089634ec50b 
Output: mount error: could not resolve address for smb-server.default.svc.cluster.local: Unknown error

And there is this error message in the csi-smb-controller pod log:

E0910 13:40:48.719478       1 controller.go:957] error syncing claim "d886cbbb-a8a3-4411-9871-e089634ec50b": failed to provision volume with StorageClass "smb": rpc error: code = Internal desc = failed to mount smb server: rpc error: code = Internal desc = volume(smb-server.default.svc.cluster.local/share#pvc-d886cbbb-a8a3-4411-9871-e089634ec50b#) mount "//smb-server.default.svc.cluster.local/share" on "/tmp/pvc-d886cbbb-a8a3-4411-9871-e089634ec50b" failed with mount failed: exit status 1
Mounting command: mount
Mounting arguments: -t cifs -o dir_mode=0777,file_mode=0777,uid=1001,gid=1001,<masked> //smb-server.default.svc.cluster.local/share /tmp/pvc-d886cbbb-a8a3-4411-9871-e089634ec50b
Output: mount error: could not resolve address for smb-server.default.svc.cluster.local: Unknown error

But the used service is present in my kind cluster:

kubectl get service -A                                                                                                                                                                    simon@edora
NAMESPACE     NAME         TYPE        CLUSTER-IP    EXTERNAL-IP   PORT(S)                  AGE
default       kubernetes   ClusterIP   10.96.0.1     <none>        443/TCP                  20m
default       smb-server   ClusterIP   10.96.24.87   <none>        445/TCP                  19m
kube-system   kube-dns     ClusterIP   10.96.0.10    <none>        53/UDP,53/TCP,9153/TCP   20m

When I try to access the share with smbclient in an ubuntu pod, it connects, but I get a NT_STATUS_ACCESS_DENIED error when trying to list the root directory:

# smbclient -U USERNAME //smb-server.default.svc.cluster.local/share
Password for [WORKGROUP\USERNAME]:
Try "help" to get a list of possible commands.
smb: \> ls
NT_STATUS_ACCESS_DENIED listing \*
8bit
  • 111
  • 2

0 Answers0