Closed kassner closed 3 years ago
Is this the Go-based implementation or bash-based implementation of kubens? There are no code changes between the two versions mentioned https://github.com/ahmetb/kubectx/compare/v0.9.2...v0.9.3.
Golang, from the releases page: https://github.com/ahmetb/kubectx/releases/download/v0.9.3/kubens_v0.9.3_linux_x86_64.tar.gz
And you’re certain the same binary w/ 0.9.2 does not reproduce? If so, I have no reasonable explanation.
If you want to compare the checksums:
$ sha256sum kubens*
f479cb7c46e5e1844e57920ecc96489e1c2785c2e89e14abd8e6699b4323c0e4 kubens-0.9.2
58b9a3c4707ff39d7bed4c28afeeb1b1007bf9255c80ba6711bd3a515344baf9 kubens-0.9.3
$ ./kubens-0.9.2
default
www
$ ./kubens-0.9.3
error: could not list namespaces (is the cluster accessible?): failed to list namespaces from k8s API: Get "https://<ip>/api/v1/namespaces?limit=500": dial tcp <ip>:443: i/o timeout
The only other difference is that the 0.9.3 binary is 1172KB smaller, but I have no idea if that should mean something.
Ok here’s from Go1.16 release notes:
The ProxyFromEnvironment function no longer returns the setting of the HTTP_PROXY environment variable for https:// URLs when HTTPS_PROXY is unset.
so you need to use HTTPS_PROXY from now on.
Yeah, that was it:
$ HTTPS_PROXY=$http_proxy ./kubens-0.9.3
default
www
Awesome. Thank you @ahmetb!
Looks like 0.9.3 lost the ability to use the
http_proxy
environment variable to connect to the cluster.Up to 0.9.2 I am able to just use:
On 0.9.3:
<ip>
in this particular context is a GKE instance that only allows connections via a bastion. I have tinyproxy running in the bastion.localhost:8888
is provided by a SSH tunnel (ssh -f -L 8888:127.0.0.1:8888 -N my-bastion
).