Kubeforward is a small interactive CLI which allows to easily expose a Kubernetes pod to your local machine
Download the CLI with the following command
curl -L -O https://github.com/shigedangao/kubeforward/releases/download/v0.1.0/kubeforward-osx-arm.zip && unzip kubeforward-osx-arm.zip
curl -L -O https://github.com/shigedangao/kubeforward/releases/download/v0.1.0/kubeforward-osx.zip && unzip kubeforward-osx.zip
curl -L -O https://github.com/shigedangao/kubeforward/releases/download/v0.1.0/kubeforward-linux.zip && unzip kubeforward-linux.zip
By default, kubeforward will look for the current kubernetes config you're using. It'll also ask the namespace which you want to use
kubeforward
If you wish to use a different kubernetes context you can use the -c
option. The CLI will output a list of kubernetes contexts available in your kubeconfig
kubeforward -c
If you already know the namespace where the pod is located you can use the -n
option.
kubeforward -n
Of course you can combine the two options like below
kubeforward -c -n