Access a Kubernetes cluster that's behind a jump host

SOCKS5

Setup a SOCKS5 tunnel and start forwarding to a port of your choice. We are using 1337:

# assuming your jump host can be reached via root@172.xx.xx.xx

ssh -D -N  1337 root@172.xx.xx.xx

# D --> Setup a SOCKS5 server on 1337
# N --> Start simple port-forwarding

Test out with a Kubectl cmd:

HTTPS_PROXY=socks5://localhost:1337 kubectl get pods -A

Curl:

curl -x socks5h://localhost:1337 v -k -X GET https://superawesome.server