kubernetes-csi / csi-driver-smb

This driver allows Kubernetes to access SMB Server on both Linux and Windows nodes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New-SmbGlobalMapping : Network access is denied on pods windows.

mrnim94 opened this issue · comments

The pods in the windows node cannot mount the SMB server.

kubelet, ip-10-195-92-9.us-west-2.compute.internal MountVolume.MountDevice failed for volume "pvc-5e7e2dc6-b9d9-4173-b6c5-49c17ad1357a" : rpc error: code = Internal desc = volume(172.20.181.152/share#pvc-5e7e2dc6-b9d9-4173-b6c5-49c17ad1357a#) mount "//172.20.181.152/share/pvc-5e7e2dc6-b9d9-4173-b6c5-49c17ad1357a" on "\\var\\lib\\kubelet\\plugins\\kubernetes.io\\csi\\smb.csi.k8s.io\\f380de183f6db048fc7c061952fea8afaf9508f2f0694910c390b7a1d75593ad\\globalmount" failed with NewSmbGlobalMapping(\\172.20.181.152\share\pvc-5e7e2dc6-b9d9-4173-b6c5-49c17ad1357a, c:\var\lib\kubelet\plugins\kubernetes.io\csi\smb.csi.k8s.io\f380de183f6db048fc7c061952fea8afaf9508f2f0694910c390b7a1d75593ad\globalmount) failed with error: rpc error: code = Unknown desc = NewSmbGlobalMapping failed. output: "New-SmbGlobalMapping : Network access is denied. \r\nAt line:1 char:190\r\n+ ... ser, $PWord;New-SmbGlobalMapping -RemotePath $Env:smbremotepath -Cred ...\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n + CategoryInfo : NotSpecified: (MSFT_SmbGlobalMapping:ROOT/Microsoft/...mbGlobalMapping) [New-SmbGlobalMa \r\n pping], CimException\r\n + FullyQualifiedErrorId : Windows System Error 65,New-SmbGlobalMapping\r\n \r\n", err: exit status 1

The log says that "New-SmbGlobalMapping : Network access is denied".
But when I stay inside the Windows node, and I run telnet to IP và port of SMB server. So the telnet report is "connected".
The pods on the Linux node still mount to SMB normally.

  • CSI Driver version:
  • Kubernetes version (use kubectl version): EKS 1.24
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

I found out the reason for this issue.
Because of using the "smb encrypt = off' >>$file" in the samba server.
I have removed it.
They are working!

I found out the reason for this issue. Because of using the "smb encrypt = off' >>$file" in the samba server. I have removed it. They are working!

I am having this issue. Can you provide more details? I.e. where did you create the file? We are trying to use SMB to access a NAS server as well as windows shares.