Kubernetes port-forward manager with multi-cluster support, automatic reconnection, and a TUI dashboard.
Note: Only tested on macOS. Linux should work but is untested.
go install github.com/invisible1988/kfwd/cmd/kfwd@latestcurl -sL "https://github.com/invisible1988/kfwd/releases/latest/download/kfwd_$(curl -sI https://github.com/invisible1988/kfwd/releases/latest | grep -i location | sed 's/.*tag\/v//;s/\r//')_$(uname -s | tr A-Z a-z)_$(uname -m | sed 's/x86_64/amd64/').tar.gz" | sudo tar xz -C /usr/local/bin kfwdOr download manually from Releases.
mkdir -p ~/.zsh/completions
kfwd completion zsh > ~/.zsh/completions/_kfwd
# add to .zshrc (before compinit) if not already present:
# fpath=(~/.zsh/completions $fpath)
# Other systems — write to any directory in your $fpath:
# kfwd completion zsh > /path/in/fpath/_kfwd# Interactive setup — register a cluster from your kubeconfig
kfwd setup
# Start a port-forward
kfwd run svc/my-service 8080:80
# Open the TUI dashboard
kfwdOpens the TUI dashboard showing Active, Saved, and Recent forwards. Start/stop forwards, view status, and manage bookmarks interactively.
Quick ephemeral port-forward (not saved as a bookmark).
kfwd run svc/my-service 8080:80
kfwd run -n my-namespace deploy/my-app 3000:3000
kfwd run -c my-cluster pod/my-pod 9090:9090Interactive wizard to register a cluster from your kubeconfig.
kfwd cluster add <name> --kubeconfig ~/.kube/config --context my-context
kfwd cluster list
kfwd cluster remove <id>Manage saved forward bookmarks.
kfwd add # interactive wizard
kfwd list
kfwd start <id>
kfwd stop <id>
kfwd remove <id>Show daemon status and active forwards.
kfwd daemon start
kfwd daemon stop
kfwd daemon statusExport and import clusters and forward configs as JSON.
kfwd export > backup.json
kfwd import < backup.jsonkfwd runs as a background daemon communicating over a Unix socket (~/.kube-forwarder/daemon.sock). CLI commands talk to the daemon via ConnectRPC. State is stored in a local SQLite database (~/.kube-forwarder/kfwd.db).
MIT