Nahian Pathan
2001

2001

Access a Kubernetes cluster that's behind a jump host

SOCKS5

Nahian Pathan's photo
Nahian Pathan

Published on Oct 21, 2021

1 min read

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
 
Share this