-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
k3s-agent loadbalancer is not using the HTTP*_PROXY var #8976
Comments
The agent load-balancer is not supposed to use a proxy to connect to the server. You should ensure that the agent has direct connectivity to all of the listed ports on the servers, as well as the CNI ports on all cluster members. This is covered in the docs at https://docs.k3s.io/installation/requirements#networking Even if we did allow the load-balancer to use a proxy, you'd still need to open up other ports to make the CNI work - so why bother. |
Thanks for your answer. |
Reopened because the associate PR is still in progress |
Hey all!
TLDR: Commit id before these changes its working fine for me with setting https_proxy vars i can join normally an agent using the proxy Commit id for last changes its also working fine also with the usage of K3S_AGENT_HTTP_PROXY_ALLOWED=true the only "odd" behavior is that even proxy is working fine and showing comms happening thourgh that , on tcpdumps logs still shows communications between server and agent Validated on Version:-$ k3s version 1.29.0+k3s-c87e6e5f
Environment DetailsInfrastructure Node(s) CPU architecture, OS, and Version: Cluster Configuration: Steps to validate the fix
Reproduction Issue:
Validation Results:
|
Shouldn't |
Tk you ! it was in there , this was just a copy and paste mistake from the reproduction steps, which does not have this var Already fixed, tks again |
Environmental Info:
K3s Version:
k3s version v1.27.7+k3s2 (575bce7) go version go1.20.10
Node(s) CPU architecture, OS, and Version:
Linux azmed 5.4.0-144-generic #161-Ubuntu SMP Fri Feb 3 14:49:04 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Cluster Configuration:
3 servers setup behind a loadbalancer, 50ish agents.
Agents are installed in various areas with unique network configuration each time, which we can't access fully so logs will be limited to the agent environment.
Describe the bug:
Agents fail to contact & register the loadbalancer whenever there is a proxy in use, typically set as an env variable with HTTPS_PROXY, HTTP_PROXY, NO_PROXY and its lowercase alternative (CONTAINERD_ prefixed as well.
The agent logs from a startup sequence:
To test the URLs is reachable from the machine, we did try:
Confirming it is reachable using the proxy variables set on the system as follows:
env |grep proxy https_proxy=redacted http_proxy=redacted
We also try to reach the k3s-agent loadbalancer locally:
Confirming a bit more the issue with the loadbalancer.
I'm not pasting tcpdumps logs here, but capturing outgoing packets to the IP of the master node directly shows dropped traffic, whereas it should show nothing since we should go through the configured proxy, which is to me the final hint of the proxy not being used by k3s loadbalancer.
Steps To Reproduce:
We installed K3S through:
curl -sfL https://get.k3s.io | K3S_URL='' K3S_TOKEN='' K3S_NODE_NAME='' sh -
Expected behavior:
We expected the traffic to go through the configured HTTP_PROXY & HTTPS_PROXY.
Actual behavior:
The traffic is actually bypassing our proxy settings.
Additional context / logs:
Just to confirm our ENV variables were taken into account by the service, we checked the /proc//environ:
I'm available for any tests/logs you need !
The text was updated successfully, but these errors were encountered: