Skip to content

Commit 6ffd07c

Browse files
committed
Updates for EnableCompartmentNamespace fix for GMSA
1 parent f13522b commit 6ffd07c

File tree

1 file changed

+7
-46
lines changed

1 file changed

+7
-46
lines changed

content/en/docs/tasks/configure-pod-container/configure-gmsa.md

Lines changed: 7 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -199,56 +199,17 @@ As Pod specs with GMSA fields populated (as described above) are applied in a cl
199199

200200
1. The container runtime configures each Windows container with the specified GMSA credential spec so that the container can assume the identity of the GMSA in Active Directory and access services in the domain using that identity.
201201

202-
## Containerd
202+
## Authenticating to network shares usinig hostname of FQDN
203203

204-
On Windows Server 2019, in order to use GMSA with containerd, you must be running OS Build 17763.1817 (or later) which can be installed using the patch [KB5000822](https://support.microsoft.com/en-us/topic/march-9-2021-kb5000822-os-build-17763-1817-2eb6197f-e3b1-4f42-ab51-84345e063564).
204+
If you are experiencing issues connecting to SMB shares from Pods using hostname or FQDN, but are able to access the shares via their IPv4 address then make sure the following registry key is set on the Windows nodes.
205205

206-
There is also a known issue with containerd that occurs when trying to connect to SMB shares from Pods. Once you have configured GMSA, the pod will be unable to connect to the share using the hostname or FQDN, but connecting to the share using an IP address works as expected.
207-
208-
```PowerShell
209-
ping adserver.ad.local
210-
```
211-
212-
and correctly resolves the hostname to an IPv4 address. The output is similar to:
213-
214-
```PowerShell
215-
Pinging adserver.ad.local [192.168.111.18] with 32 bytes of data:
216-
Reply from 192.168.111.18: bytes=32 time=6ms TTL=124
217-
Reply from 192.168.111.18: bytes=32 time=5ms TTL=124
218-
Reply from 192.168.111.18: bytes=32 time=5ms TTL=124
219-
Reply from 192.168.111.18: bytes=32 time=5ms TTL=124
220-
```
221-
222-
However, when attempting to browse the directory using the hostname
223-
224-
```PowerShell
225-
cd \\adserver.ad.local\test
226-
```
227-
228-
you see an error that implies the target share doesn't exist:
229-
230-
```PowerShell
231-
cd : Cannot find path '\\adserver.ad.local\test' because it does not exist.
232-
At line:1 char:1
233-
+ cd \\adserver.ad.local\test
234-
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
235-
+ CategoryInfo : ObjectNotFound: (\\adserver.ad.local\test:String) [Set-Location], ItemNotFoundException
236-
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLocationCommand
237-
```
238-
239-
but you notice that the error disappears if you browse to the share using its IPv4 address instead; for example:
240-
241-
```PowerShell
242-
cd \\192.168.111.18\test
243-
```
244-
245-
After you change into a directory within the share, you see a prompt similar to:
246-
247-
```PowerShell
248-
Microsoft.PowerShell.Core\FileSystem::\\192.168.111.18\test>
206+
```cmd
207+
reg add "HKLM\SYSTEM\CurrentControlSet\Services\hns\State" /v EnableCompartmentNamespace /t REG_DWORD /d 1
249208
```
250209

251-
To correct the behaviour you must run the following on the node `reg add "HKLM\SYSTEM\CurrentControlSet\Services\hns\State" /v EnableCompartmentNamespace /t REG_DWORD /d 1` to add the required registry key. This node change will only take effect in newly created pods, meaning you must now recreate any running pods which require access to SMB shares.
210+
Running Pods will then need to be recreated to pick up the behavior changes.
211+
More information on how this registry key is used can be found [here](
212+
https://github.com/microsoft/hcsshim/blob/885f896c5a8548ca36c88c4b87fd2208c8d16543/internal/uvm/create.go#L74-L83)
252213

253214
## Troubleshooting
254215

0 commit comments

Comments
 (0)