skip to Main Content

I am using the Kubernetes(v1.23.13) with the container and Flannel CNI. The Kubernetes cluster created on ubuntu (v 18) VM(vmware esxi) and windows server running on another VM. I follow the link below to add the windows(windows server 2019) node to the cluster. Windows node added the cluster. But the windows kube-proxy and demonset pod deployment has failed.

Link https://web.archive.org/web/20220530090758/https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/adding-windows-nodes/

Error: Normal Created (x5 over ) kubelet Created container kube-proxy
Normal Pulled (x5 over ) kubelet Container image "sigwindowstools/kube-proxy:v1.23.13-nanoserver" already present on machine
Warning Failed kubelet Error: failed to create containerd task: hcsshim::CreateComputeSystem kube-proxy: The directory name is invalid.
(extra info: {"Owner":"containerd-shim-runhcs-v1.exe","SchemaVersion":{"Major":2,"Minor":1},"Container":{"GuestOs":{"HostName":"kube-proxy-windows-hq7bb"},"Storage":{"Layers":[{"Id":"e30f10e1-6696-5df6-af3f-156a372bce4e","Path":"C:ProgramDatacontainerdrootio.containerd.snapshotter.v1.windowssnapshots19"},{"Id":"8aa59a8b-78d3-5efe-a3d9-660bd52fd6ce","Path":"C:ProgramDatacontainerdrootio.containerd.snapshotter.v1.windowssnapshots18"},{"Id":"f222f973-9869-5b65-a546-cb8ae78a32b9","Path":"C:ProgramDatacontainerdrootio.containerd.snapshotter.v1.windowssnapshots17"},{"Id":"133385ae-6df6-509b-b342-bc46338b3df4","Path":"C:ProgramDatacontainerdrootio.containerd.snapshotter.v1.windowssnapshots16"},{"Id":"f6f9524c-e3f0-5be2-978d-7e09e0b21299","Path":"C:ProgramDatacontainerdrootio.containerd.snapshotter.v1.windowssnapshots15"},{"Id":"0d9d58e6-47b6-5091-a552-7cc2027ca06f","Path":"C:ProgramDatacontainerdrootio.containerd.snapshotter.v1.windowssnapshots14"},{"Id":"6715ca06-295b-5fba-9224-795ca5af71b9","Path":"C:ProgramDatacontainerdrootio.containerd.snapshotter.v1.windowssnapshots13"},{"Id":"75e64a3b-69a5-52cf-b39f-ee05718eb1e2","Path":"C:ProgramDatacontainerdrootio.containerd.snapshotter.v1.windowssnapshots12"},{"Id":"8698c4b4-b092-57c6-b1eb-0a7ca14fcf4e","Path":"C:ProgramDatacontainerdrootio.containerd.snapshotter.v1.windowssnapshots11"},{"Id":"7c9a6fb7-2ca8-5ef7-bbfe-cabbff23cfa4","Path":"C:ProgramDatacontainerdrootio.containerd.snapshotter.v1.windowssnapshots10"},{"Id":"a10d4ad8-f2b1-5fd6-993f-7aa642762865","Path":"C:ProgramDatacontainerdrootio.containerd.snapshotter.v1.windowssnapshots9"}],"Path":"\?Volume{64336318-a64f-436e-869c-55f9f8e4ea62}"},"MappedDirectories":[{"HostPath":"c:","ContainerPath":"c:host"},{"HostPath":"c:varlibkubeletpods1cd0c333-3cd0-4c90-9d22-884ea73e8b69containerskube-proxye58a001","ContainerPath":"c:devtermination-log"},{"HostPath":"c:varlibkubeletpods1cd0c333-3cd0-4c90-9d22-884ea73e8b69volumeskubernetes.io~configmapkube-proxy","ContainerPath":"c:varlibkube-proxy","ReadOnly":true},{"HostPath":"c:varlibkubeletpods1cd0c333-3cd0-4c90-9d22-884ea73e8b69volumeskubernetes.io~configmapkube-proxy-windows","ContainerPath":"c:varlibkube-proxy-windows","ReadOnly":true},{"HostPath":"c:varlibkubeletpods1cd0c333-3cd0-4c90-9d22-884ea73e8b69volumeskubernetes.io~projectedkube-api-access-4zs46","ContainerPath":"c:varrunsecretskubernetes.ioserviceaccount","ReadOnly":true},{"HostPath":"c:varlibkubeletpods1cd0c333-3cd0-4c90-9d22-884ea73e8b69etc-hosts","ContainerPath":"C:WindowsSystem32driversetchosts"}],"MappedPipes":[{"ContainerPipeName":"rancher_wins","HostPath":"\.piperancher_wins"}],"Networking":{"Namespace":"4a4d0354-251a-4750-8251-51ae42707db2"}},"ShouldTerminateOnLastHandleClosed":true}): unknown
Warning BackOff (x23 over ) kubelet Back-off restarting failed container

 kubectl get pods -A
NAMESPACE     NAME                                      READY   STATUS             RESTARTS             AGE
kube-system   coredns-64897985d-2mkd5                   1/1     Running            0                    19h
kube-system   coredns-64897985d-qhhbz                   1/1     Running            0                    19h
kube-system   etcd-scspa2658542001                      1/1     Running            2                    19h
kube-system   kube-apiserver-scspa2658542001            1/1     Running            8 (3h4m ago)         19h
kube-system   kube-controller-manager-scspa2658542001   1/1     Running            54 (126m ago)        19h
kube-system   kube-flannel-ds-hjw8s                     1/1     Running            14 (18h ago)         19h
kube-system   kube-flannel-ds-windows-amd64-xfhjl       0/1     ImagePullBackOff   0                    29m
kube-system   kube-proxy-windows-hq7bb                  0/1     CrashLoopBackOff   10 (<invalid> ago)   29m
kube-system   kube-proxy-wx2x9                          1/1     Running            0                    19h
kube-system   kube-scheduler-scspa2658542001            1/1     Running            92 (153m ago)        19h

2

Answers


  1. From this issue, it seems windows nodes with flannel has issues they have solved with different work arounds,

    As mentioned in the issue they have made a guide to work windows properly, Follow this doc with the installation guide and requirements.

    Attaching troubleshooting blog and issue for crashloop backoff.

    Login or Signup to reply.
  2. I had a similar error failed to create containerd task: hcsshim::CreateComputeSystem with flannel on k8s v1.24. The cause was that Windows OS patches had not been applied. You must have applied the patch related to KB4489899.

    https://github.com/kubernetes-sigs/sig-windows-tools/blob/master/guides/guide-for-adding-windows-node.md#before-you-begin

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search