antrea-io / antrea

Kubernetes networking based on Open vSwitch
https://antrea.io
Apache License 2.0
1.65k stars 364 forks source link

antctl.exe fails to run on Windows VM due to missing in-cluster configuration #6687

Open XinShuYang opened 1 week ago

XinShuYang commented 1 week ago

Describe the bug Running antctl.exe on a Windows VM results in an error. The same command works fine when executed inside a Windows pod.

To Reproduce

  1. Run antctl.exe supportbundle on a Windows Node.
  2. Observe the error output.

Expected The command antctl.exe supportbundle should execute successfully on the Windows VM, similar to how it works inside the Windows pod.

Actual behavior When executing antctl.exe on a Windows VM, the following error is returned:

PS C:\k\antrea\bin> .\antctl.exe supportbundle  
Error: error when creating system client: unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined  

Versions: Antrea v2.1