Kubernetes support for windows containers

I pushed a Windows image to a Private Docker Container Registry successfully. I then attempted to create a Docker Desktop Kubernetes pod using the Windows image from the Private Docker Container Registry but the pod shows a status of ImagePullBackOff. The pod details display the following message:

Failed to pull image “localhost:5000/mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019”: failed to extract layer (application/vnd.docker.image.rootfs.diff.tar.gzip sha256:7e0185e5b0bc371e6a0b785df87b148b1197f664b0031729a20216618e1b44f2) to overlayfs as “extract-318778953-k-IL sha256:aadca9fbf8af3179bf2edce53d20ac5edd1fbe99d9d7d01aeabe37bc15a9adc7”: link /var/lib/desktop-containerd/daemon/io.containerd.snapshotter.v1.overlayfs/snapshots/2969/fs/Files/Program Files/common files/Microsoft Shared/Ink/en-US/micaut.dll.mui /var/lib/desktop-containerd/daemon/io.containerd.snapshotter.v1.overlayfs/snapshots/2969/fs/Files/Program Files (x86)/common files/Microsoft Shared/ink/en-US/micaut.dll.mui: no such file or directory

Reproduce:

  1. Start Docker Desktop using Linux containers
  2. Enable Kubernetes
  3. Complete Kubernetes Cluster Installation
  4. Install and setup kubectl
  5. Create a Private Docker Container Registry by running the PowerShell command: docker run -d -p 5000:5000 --restart=always --name medchart-registry -e REGISTRY_LOG_LEVEL=info -e OTEL_TRACES_EXPORTER=none registry
  6. Switch to Windows containers
  7. Pull down the Windows image by running the PowerShell command: docker pull <mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019>
  8. Tag the Windows image by running the PowerShell command: docker tag <mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019> localhost:5000/mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019
  9. Push the Windows image to the Private Docker Container Registry by running the PowerShell command: docker push localhost:5000/mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019
  10. Generate a Kubernetes manifest file named dotnet-aspnet.yaml in the C:\Temp\kubectl\manifests\Windows\ folder with the following content:
    apiVersion: v1
    kind: Pod
    metadata:
    name: dotnet-aspnet-windows-pod
    spec:
    containers:
    -name: dotnet-aspnet-windows-container
    image: localhost:5000/mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019
    imagePullPolicy: IfNotPresent
  11. Create the Kubernetes pod by running the PowerShell command: kubectl apply -f “C:\Temp\kubectl\manifests\Windows\dotnet-aspnet.yaml”
  12. View the status of the Kubernetes pod by running the PowerShell command: kubectl get pods
  13. The Kubernetes pod will be showing as NOT READY and with a STATUS of ImagePullBackOff
  14. View the details of the Kubernetes pod by running the PowerShell command: kubectl describe pod dotnet-aspnet-windows-pod
  15. The Kubernetes pod details will be showing the following message: Failed to pull image “localhost:5000/mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019”: failed to extract layer (application/vnd.docker.image.rootfs.diff.tar.gzip sha256:7e0185e5b0bc371e6a0b785df87b148b1197f664b0031729a20216618e1b44f2) to overlayfs as “extract-719570160-uSDy sha256:aadca9fbf8af3179bf2edce53d20ac5edd1fbe99d9d7d01aeabe37bc15a9adc7”: link /var/lib/desktop-containerd/daemon/io.containerd.snapshotter.v1.overlayfs/snapshots/2967/fs/Files/Program Files/common files/Microsoft Shared/Ink/en-US/micaut.dll.mui /var/lib/desktop-containerd/daemon/io.containerd.snapshotter.v1.overlayfs/snapshots/2967/fs/Files/Program Files (x86)/common files/Microsoft Shared/ink/en-US/micaut.dll.mui: no such file or directory
  16. View the details of the Private Docker Container Registry image manifest by running the command: curl -X GET localhost:5000/v2/mcr.microsoft.com/dotnet/framework/aspnet/manifests/4.8-windowsservercore-ltsc2019
  17. The Private Container Registry image manifest details will show Layer 2 with the digest that matches the error message
  18. Layer 2 of the Windows image is ‘Install update 10.0.17763.7558’

If you want to ask for a feature, you can do it in the roadmap:

But currently Kubernetes in Docker Desktop is based on Kind or kubeadm in a Linux virtual machine. where kubeadm-based clusters are single-node clusters and kind-based clusters are made of docker containers in the same Linux VM as Kubernetes nodes.. Even if you could add your Windows host as a worker, you would still need a Linux VM to run the master as far as I know.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.