1

I have kubectl installed in my system where when I run the below command, I get the error as

$ kubectl get po --v=9
I0601 14:09:21.058688   24000 loader.go:372] Config loaded from file:  [dir]\.kube\config
I0601 14:09:21.060188   24000 round_trippers.go:466] curl -v -XGET  -H "Accept: application/json, */*" -H "User-Agent: kubectl.exe/v1.23.0 (windows/amd64) kubernetes/ab69524" -H "Authorization: Bearer <masked>" 'https://[IP]:6443/api?timeout=32s'
I0601 14:09:21.069300   24000 round_trippers.go:495] HTTP Trace: DNS Lookup for [host].com resolved to [{IP }]
I0601 14:09:21.244708   24000 round_trippers.go:510] HTTP Trace: Dial to tcp:[IP]:80 succeed
I0601 14:09:21.416190   24000 round_trippers.go:570] HTTP Statistics: DNSLookup 9 ms Dial 175 ms TLSHandshake 0 ms Duration 356 ms
I0601 14:09:21.416190   24000 round_trippers.go:577] Response Headers:
I0601 14:09:21.416190   24000 cached_discovery.go:121] skipped caching discovery info due to Get "https://[IP]:6443/api?timeout=32s": Temporary Redirect
I0601 14:09:21.416766   24000 round_trippers.go:466] curl -v -XGET  -H "Authorization: Bearer <masked>" -H "Accept: application/json, */*" -H "User-Agent: kubectl.exe/v1.23.0 (windows/amd64) kubernetes/ab69524" 'https://[IP]:6443/api?timeout=32s'

But with the same config file, I am able to connect from other UI tools.

I tried these but didn't worked

unset https_proxy
unset http_proxy
unset all_proxy

Any idea on what I am missing?

raaeusagvc
  • 71
  • 6

1 Answers1

0

if you are in a VPN make sure to keep the https_proxy environment variable but add the IP of any local docker server (e.g. docker-desktop or rancher-desktop) to the no_proxy list.

pref
  • 1,651
  • 14
  • 24