kubefwd is used to forward Kubernetes services running in a remote cluster to a local workstation, easing the development of applications that communicate with other services. kubefwd, pronounced Kube Forward, is a single binary, command line application written in Go.
kubefwd does not require you to make any modifications to remote clusters. If you currently use kubectl, you have met the requirements for kubefwd.
kubefwd is a bulk port-forwarder for Kubernetes, helping you develop applications locally. Running kubefwd allows you to access any Service from your local workstation just as you would from within another Pod in the same Namespace on the cluster https://t.co/Y77TRFdNjc pic.twitter.com/ABlund5iid— Cloud Native DevOps (@cloudnatived) October 23, 2018
I don't run Kubernetes locally, but I do depend on services running in remote clusters. I either extract service IPs, or set up port forwarding, and keep my existing workflow. kubefwd is the tool I've been missing. https://t.co/SCMZfl4eZn pic.twitter.com/7j6EpevHN1— Kelsey Hightower (@kelseyhightower) November 5, 2018
MacOs install with homebrew:
brew install txn2/tap/kubefwd
Get a list of service forwarding options:
kubefwd help svc
Forward services in the example namespace:
sudo -E kubefwd svc -n example
brew upgrade kubefwd
Get the latest rpm, deb or snap packages from Github including binary releases for Linux, Windows and MacOs. Support for AMD64 and ARM architectures.
This option does not require sudo to run, however named services will only be available from within the docker container.
docker run --rm --name fwd -v "$HOME/.kube/config:/root/.kube/config" -it txn2/kubefwd:1.4.10 svc
Assuming you have a service named ok listening on port 80, in another terminal issue a curl command from the running container:
docker exec fwd curl -s http://ok:80
Compiling from source requires Go:
mkdir -p ~/go/src/github.com/txn2/
git clone [email protected]:txn2/kubefwd.git ~/go/src/github.com/txn2/kubefwd
cd ~/go/src/github.com/txn2/kubefwd git checkout 1.4.10
GOBIN=~/bin go install -ldflags="-X main.Version=1.4.10" ./cmd/kubefwd/kubefwd.go