Skip to content

k3s agent cannot connect to server via proxy when flag --disable-apiserver-lb enabled #10918

Closed Answered by brandond
htrongnguyen94 asked this question in Q&A
Discussion options

You must be logged in to vote

The http.Client we construct does not enable reading proxy config from the environment, since it's supposed to be talking to the local apiserver load-balancer endpoint and we wouldn't want to go through a proxy for that... so I suspect that no, it will not work through a proxy.

client := &http.Client{
Timeout: defaultClientTimeout,
Transport: &http.Transport{
DisableKeepAlives: true,
TLSClientConfig: tlsConfig,
},
}

The apiserver load-balancer does support use of a proxy, if you enable it via an env var:

// Se…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@brandond
Comment options

Answer selected by brandond
@htrongnguyen94
Comment options

@brandond
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants