You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: deploy/example/windows/README.md
+62Lines changed: 62 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,3 +26,65 @@ C:/ $ ls mnt/smb
26
26
```
27
27
28
28
In the above example, there is a `c:\mnt\smb` directory mounted as SMB filesystem.
29
+
30
+
## Name resolution
31
+
32
+
It is important to note that if you have defined your Storage class based on the name of the service, then the Windows NODE must be able to resolve that name (ie. outside Kubernetes).
and the error you get in logs (`kubectl logs -n kube-system ds/csi-proxy`) is the famous `The network path was not found`:
48
+
49
+
```
50
+
I0706 02:11:47.703698 4460 server.go:56] calling NewSmbGlobalMapping with remote path "\\\\smb-server.default.svc.cluster.local\\share\\pvc-1a6c607b-df88-4a61-8628-4d9d066dc158"
51
+
I0706 02:11:48.524376 4460 server.go:98] Remote \\smb-server.default.svc.cluster.local\share not mapped. Mapping now!
52
+
E0706 02:11:49.319012 4460 server.go:101] failed NewSmbGlobalMapping NewSmbGlobalMapping failed. output: "New-SmbGlobalMapping : The network path was not found. \r\nAt line:1 char:190\r\n+ ... , $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 53,New-SmbGlobalMapping\r\n \r\n", err: exit status 1
53
+
```
54
+
55
+
For most cloud providers that offer Windows nodes, this is not an issue. Those nodes will be part of a domain where name resolution includes the Kubernetes dns resolution.
56
+
57
+
For self-hosted Kubernetes clusters there is no default name resolution to solve this issue.
58
+
59
+
### Name resolution solution
60
+
61
+
A simple _hack_ workaround is to use a fixed ClusterIP for the smb service, and use the IP in the storageClass.
62
+
63
+
It is VERY VERY much not recommended to use fixed IPs inside Kubernetes, but in this very specific case it make for a simple workaround.
64
+
65
+
The IP needs to be in the service CIDR range, e.g. if it is `10.96.0.0/12`, you could pick `10.111.254.254`.
66
+
67
+
```yaml
68
+
apiVersion: v1
69
+
kind: Service
70
+
metadata:
71
+
...
72
+
spec:
73
+
type: ClusterIP
74
+
clusterIP: 10.111.254.254
75
+
...
76
+
```
77
+
and
78
+
```yaml
79
+
apiVersion: storage.k8s.io/v1
80
+
kind: StorageClass
81
+
metadata:
82
+
name: smb
83
+
provisioner: smb.csi.k8s.io
84
+
parameters:
85
+
source: "//10.111.254.254/share"
86
+
...
87
+
```
88
+
89
+
If `kubectl logs -n kube-system ds/csi-proxy` continues to use names after this fix, it might be necessary to reboot the node.
0 commit comments