-
Notifications
You must be signed in to change notification settings - Fork 919
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
kubectl
v1.29.3
ignores HTTPS_PROXY
environment variable
#1653
Comments
kubectl
v1.29.3
ignores `kubectl
v1.29.3
ignores HTTPS_PROXY
environment variable
Interesting, could you please try; HTTPS_PROXY=socks5://localhost:8002; kubectl get nodes --context kind-remote-host also run this command with high verbosity to see; HTTPS_PROXY=socks5://localhost:8002; kubectl get nodes --context kind-remote-host -v=9 |
Why do I see Without
|
Sounds like an issue and requires investigation.
What is the exact command configuring this on Kind cluster? |
/triage accepted |
There is no proxy information on the remote Kind cluster. Basically:
Don't think it is relevant, but here is my Kind config file: kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: nyc3-shared
nodes:
- role: control-plane
- role: worker
- role: worker
- role: worker And I created it with the command |
I also tried on a Ubuntu 22.04 x86_64 host of mine: $ kubectl version
Client Version: v1.30.1
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.31.0 It has the same behavior as above on my mac. Also tried a more recent $ ./kubectl version
Client Version: v1.31.0
Kustomize Version: v5.4.2
Server Version: v1.31.0 |
Thank you. I don't have remote host to test this and I need to find a way to reproduce this just on my local. |
If the apiserver address is |
Thanks @xyz-li. In that case how does |
If |
https://github.com/kubernetes/kubernetes/blob/359b9ba9bf5c508aeee0eee520d09b7bf1fdaa50/staging/src/k8s.io/client-go/tools/clientcmd/client_config.go#L198-L206 |
As there is no bug, I think we can close this issue. @kriswuollett the ask you above seems like a feature request and can be handled in a separate issue. /close |
@ardaguclu: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
What happened:
I am unable to connect to the API via a socks5 proxy via the
HTTPS_PROXY
environment variable. Instead it seems like only works when I add the same value to theproxy-url
property in the cluster config.What you expected to happen:
I expected to be able to use
kubectl
via a HTTPS proxy environment variable instead of theproxy-url
attribute according to the documentation:How to reproduce it (as minimally and precisely as possible):
kind
)ssh -D 8002 -q -N remote-host
to set up a socks proxy fromlocalhost
toremote-host
HTTPS_PROXY=socks5://localhost:8002; export HTTPS_PROXY; kubectl --context kind-remote-host get nodes
Anything else we need to know?:
The ability to use
HTTPS_PROXY
environment variable is extermely useful since it avoids hard-coding a port number to use for proxy access. Theproxy-url
attribute assumes one would want to statically assign different port numbers across numerous clusters your user account may wish to access.Environment:
Client:
Remote cluster:
The text was updated successfully, but these errors were encountered: