New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Antctl "agent mode" support on Windows #2104
Labels
area/component/antctl
Issues or PRs releated to the command line interface component
area/OS/windows
Issues or PRs related to the Windows operating system.
good first issue
Good for newcomers
kind/feature
Categorizes issue or PR as related to a new feature.
priority/important-longterm
Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Comments
antoninbas
added
kind/feature
Categorizes issue or PR as related to a new feature.
area/component/antctl
Issues or PRs releated to the command line interface component
area/OS/windows
Issues or PRs related to the Windows operating system.
good first issue
Good for newcomers
priority/important-longterm
Important over the long term, but may not be staffed and/or may need multiple releases to complete.
labels
Apr 17, 2021
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment, or this will be closed in 180 days |
github-actions
bot
added
the
lifecycle/stale
Denotes an issue or PR has remained open with no activity and has become stale.
label
Oct 15, 2021
antoninbas
removed
the
lifecycle/stale
Denotes an issue or PR has remained open with no activity and has become stale.
label
Oct 15, 2021
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment, or this will be closed in 90 days |
github-actions
bot
added
the
lifecycle/stale
Denotes an issue or PR has remained open with no activity and has become stale.
label
Jan 13, 2022
antoninbas
removed
the
lifecycle/stale
Denotes an issue or PR has remained open with no activity and has become stale.
label
Apr 6, 2022
antoninbas
added a commit
to antoninbas/antrea
that referenced
this issue
Apr 14, 2022
At the moment is is possible to run antctl in Agent mode from a Windows Node on which Antrea is runing, but it requires setting the following environment variables manually: ``` > $Env:POD_NAME="antrea-agent" > $Env:KUBERNETES_SERVICE_HOST="<ClusterIP>" > $Env:KUBERNETES_SERVICE_PORT="443" ``` This is not very convenient and it is not documented either. Additionally, there is no reason to require KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT in Agent mode. This requirement is caused by a bug in the antctl code: when antctl is running inside a Pod, there is no need to resolve the "in-cluster" Kubeconfig, as we generate this config manually to connect to the Antrea API server. In order to make antctl work out-of-the-box for that case, we change the logic which decides what the antctl "runtime mode" is: if the antctl binary is running on Windows and if a loopback client token exists, we assume that this is a Windows Node which is running the Antrea Agent. Fixes antrea-io#2104 Signed-off-by: Antonin Bas <abas@vmware.com>
antoninbas
added a commit
that referenced
this issue
Apr 18, 2022
* Out-of-the-box "Agent mode" support for antctl At the moment is is possible to run antctl in Agent mode from a Windows Node on which Antrea is runing, but it requires setting the following environment variables manually: ``` > $Env:POD_NAME="antrea-agent" > $Env:KUBERNETES_SERVICE_HOST="<ClusterIP>" > $Env:KUBERNETES_SERVICE_PORT="443" ``` This is not very convenient and it is not documented either. Additionally, there is no reason to require KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT in Agent mode. This requirement is caused by a bug in the antctl code: when antctl is running inside a Pod, there is no need to resolve the "in-cluster" Kubeconfig, as we generate this config manually to connect to the Antrea API server. In order to make antctl work out-of-the-box for that case, we change the logic which decides what the antctl "runtime mode" is: if the antctl binary is running on Windows and if a loopback client token exists, we assume that this is a Windows Node which is running the Antrea Agent. Fixes #2104 Signed-off-by: Antonin Bas <abas@vmware.com> * Run antctl e2e tests for clusters with Windows Nodes Signed-off-by: Antonin Bas <abas@vmware.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/component/antctl
Issues or PRs releated to the command line interface component
area/OS/windows
Issues or PRs related to the Windows operating system.
good first issue
Good for newcomers
kind/feature
Categorizes issue or PR as related to a new feature.
priority/important-longterm
Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Describe the problem/challenge you have
I am not sure what the best way of running antctl in "agent mode" on Windows is.
Here is what I was able to do:
download antctl for Windows and move it to a directory in the PATH, as per the antctl documentation
set some PowerShell environment variables to trick antctl into running in "agent mode":
(not sure why the 2nd and 3rd one are required for agent mode)
I would like a way to eliminate step 2 if possible. If there is an easier way to do that, I didn't find it and we should document it.
The text was updated successfully, but these errors were encountered: