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: content/en/docs/tasks/configure-pod-container/configure-gmsa.md
+71-18Lines changed: 71 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -197,21 +197,70 @@ As Pod specs with GMSA fields populated (as described above) are applied in a cl
197
197
198
198
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.
199
199
200
+
## Containerd
201
+
202
+
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).
203
+
204
+
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.
205
+
206
+
```PowerShell
207
+
ping adserver.ad.local
208
+
```
209
+
and correctly resolves the hostname to an IPv4 address. The output is similar to:
210
+
211
+
```
212
+
Pinging adserver.ad.local [192.168.111.18] with 32 bytes of data:
213
+
Reply from 192.168.111.18: bytes=32 time=6ms TTL=124
214
+
Reply from 192.168.111.18: bytes=32 time=5ms TTL=124
215
+
Reply from 192.168.111.18: bytes=32 time=5ms TTL=124
216
+
Reply from 192.168.111.18: bytes=32 time=5ms TTL=124
217
+
```
218
+
219
+
However, when attempting to browse the directory using the hostname
220
+
221
+
```PowerShell
222
+
cd \\adserver.ad.local\test
223
+
```
224
+
225
+
you see an error that implies the target share doesn't exist:
226
+
227
+
```
228
+
cd : Cannot find path '\\adserver.ad.local\test' because it does not exist.
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.
249
+
200
250
## Troubleshooting
201
251
202
252
If you are having difficulties getting GMSA to work in your environment, there are a few troubleshooting steps you can take.
203
253
204
-
First, make sure the credspec has been passed to the Pod. To do this you will need to `exec` into one of your Pods and check the output of the `nltest.exe /parentdomain` command. In the example below the Pod did not get the credspec correctly:
254
+
First, make sure the credspec has been passed to the Pod. To do this you will need to `exec` into one of your Pods and check the output of the `nltest.exe /parentdomain` command.
nltest.exe /parentdomain` results in the following error:
262
+
```
213
263
Getting parent domain failed: Status = 1722 0x6ba RPC_S_SERVER_UNAVAILABLE
214
-
PS C:\>
215
264
```
216
265
217
266
If your Pod did get the credspec correctly, then next check communication with the domain. First, from inside of your Pod, quickly do an nslookup to find the root of your domain.
@@ -224,23 +273,30 @@ This will tell us 3 things:
224
273
225
274
If the DNS and communication test passes, next you will need to check if the Pod has established secure channel communication with the domain. To do this, again, `exec` into your Pod and run the `nltest.exe /query` command.
226
275
227
-
```shell
228
-
PS C:\> nltest.exe /query
276
+
```PowerShell
277
+
nltest.exe /query
278
+
```
279
+
280
+
Results in the following output:
281
+
```
229
282
I_NetLogonControl failed: Status = 1722 0x6ba RPC_S_SERVER_UNAVAILABLE
230
283
```
231
284
232
-
This tells us that for some reason, the Pod was unable to logon to the domain using the account specified in the credspec. You can try to repair the secure channel by running the `nltest.exe /sc_reset:domain.example` command.
285
+
This tells us that for some reason, the Pod was unable to logon to the domain using the account specified in the credspec. You can try to repair the secure channel by running the following:
233
286
234
-
```shell
235
-
PS C:\> nltest /sc_reset:domain.example
287
+
```PowerShell
288
+
nltest /sc_reset:domain.example
289
+
```
290
+
291
+
If the command is successful you will see and output similar to this:
292
+
```
236
293
Flags: 30 HAS_IP HAS_TIMESERV
237
294
Trusted DC Name \\dc10.domain.example
238
295
Trusted DC Connection Status Status = 0 0x0 NERR_Success
239
296
The command completed successfully
240
-
PS C:\>
241
297
```
242
298
243
-
If the above command corrects the error, you can automate the step by adding the following lifecycle hook to your Pod spec. If it did not correct the error, you will need to examine your credspec again and confirm that it is correct and complete.
299
+
If the above corrects the error, you can automate the step by adding the following lifecycle hook to your Pod spec. If it did not correct the error, you will need to examine your credspec again and confirm that it is correct and complete.
244
300
245
301
```yaml
246
302
image: registry.domain.example/iis-auth:1809v1
@@ -252,6 +308,3 @@ If the above command corrects the error, you can automate the step by adding the
252
308
```
253
309
254
310
If you add the `lifecycle` section show above to your Pod spec, the Pod will execute the commands listed to restart the `netlogon` service until the `nltest.exe /query` command exits without error.
255
-
256
-
## GMSA limitations
257
-
When using the [ContainerD runtime for Windows](/docs/setup/production-environment/windows/intro-windows-in-kubernetes/#cri-containerd) accessing restricted network shares via the GMSA domain identity fails. The container will receive the identity of and calls from `nltest.exe /query` will work. It is recommended to use the [Docker EE runtime](/docs/setup/production-environment/windows/intro-windows-in-kubernetes/#docker-ee) if access to network shares is required. The Windows Server team is working on resolving the issue in the Windows Kernel and will release a patch to resolve this issue in the future. Look for updates on the [Microsoft Windows Containers issue tracker](https://github.com/microsoft/Windows-Containers/issues/44).
0 commit comments