Window pod: network: failed to find HNSEndpoint

Hi everybody. I just created a cluster of kubernetes consisting of a window node and a linux node. All nodes are ready, flannel and proxy for the window node ready, as shown in the picture. but when I schedule the win-web pod to the node window this pod is not running. describe pod I received: Failed to create pod sandbox: rpc error: code = Unknown desc = [failed to set up sandbox container “ff10f30f0c9e5a8660a11c784391eff92bae0eb14bd63fb4dc18b8e182176d8d” network for pod “iis-578f4849fc-ht5b7”: networkPlugin cni failed to set up pod “iis-578f4849fc-ht5b7_default” network: error while GETHNSNewtorkByName(vxlan0): Network vxlan0 not found, failed to clean up sandbox container “ff10f30f0c9e5a8660a11c784391eff92bae0eb14bd63fb4dc18b8e182176d8d” network for pod “iis-578f4849fc-ht5b7”: networkPlugin cni failed to teardown pod “iis-578f4849fc-ht5b7_default” network: failed to find HNSEndpoint ff10f30f0c9e5a8660a11c784391eff92bae0eb14bd63fb4dc18b8e182176d8d_vxlan0: Endpoint ff10f30f0c9e5a8660a11c784391eff92bae0eb14bd63fb4dc18b8e182176d8d_vxlan0 not found] . Please help me deal with them

I got the same error with

  • kubernetes v1.26.4
  • the operation system of window node is window server 2022
  • flanneld v0.21.4 vxlan mode
  • kubeproxy with winoverlay=true
  • containerd v1.7.2
  • cni-plugin v0.8.2

All components are ready without any error or warning log/stderr but got “failed to find HNSEndpoint ac9651c1cf1951d2f7dcdba46e5b5ad392c91116c1dc896c78f70ed50a040d3b_vxlan0” when i tried to run a win-webserver pod

I can run a win-webserver pod successfully with container nat and without flanneld installed

Here is the output of window-kubelet server when I tried to run a win-webserver pod with flannel vxlan

E0713 08:50:32.204545    3784 kuberuntime_manager.go:782] "CreatePodSandbox for pod failed" err="rpc error: code = Unknown desc = failed to setup network for sandbox \"ac9651c1cf1951d2f7dcdba46e5b5ad392c91116c1dc896c78f70ed50a040d3b\": plugin type=\"flannel\" name=\"vxlan0\" failed (add): error while ProvisionEndpoint(ac9651c1cf1951d2f7dcdba46e5b5ad392c91116c1dc896c78f70ed50a040d3b_vxlan0,9152E9BB-6EEC-4200-B431-0417EFB84488,ac9651c1cf1951d2f7dcdba46e5b5ad392c91116c1dc896c78f70ed50a040d3b): failed to find HNSEndpoint ac9651c1cf1951d2f7dcdba46e5b5ad392c91116c1dc896c78f70ed50a040d3b_vxlan0: Endpoint ac9651c1cf1951d2f7dcdba46e5b5ad392c91116c1dc896c78f70ed50a040d3b_vxlan0 not found" pod="cdp/win-webserver-5668684ccd-z8rmn"
E0713 08:50:32.205154    3784 pod_workers.go:965] "Error syncing pod, skipping" err="failed to \"CreatePodSandbox\" for \"win-webserver-5668684ccd-z8rmn_cdp(2ca7cb36-e5cb-4784-b40c-a19b6e5855f7)\" with CreatePodSandboxError: \"Failed to create sandbox for pod \\\"win-webserver-5668684ccd-z8rmn_cdp(2ca7cb36-e5cb-4784-b40c-a19b6e5855f7)\\\": rpc error: code = Unknown desc = failed to setup network for sandbox \\\"ac9651c1cf1951d2f7dcdba46e5b5ad392c91116c1dc896c78f70ed50a040d3b\\\": plugin type=\\\"flannel\\\" name=\\\"vxlan0\\\" failed (add): error while ProvisionEndpoint(ac9651c1cf1951d2f7dcdba46e5b5ad392c91116c1dc896c78f70ed50a040d3b_vxlan0,9152E9BB-6EEC-4200-B431-0417EFB84488,ac9651c1cf1951d2f7dcdba46e5b5ad392c91116c1dc896c78f70ed50a040d3b): failed to find HNSEndpoint ac9651c1cf1951d2f7dcdba46e5b5ad392c91116c1dc896c78f70ed50a040d3b_vxlan0: Endpoint ac9651c1cf1951d2f7dcdba46e5b5ad392c91116c1dc896c78f70ed50a040d3b_vxlan0 not found\"" pod="cdp/win-webserver-5668684ccd-z8rmn" podUID=2ca7cb36-e5cb-4784-b40c-a19b6e5855f7