Home

Awesome

🎳 forward

forward - extended kubectl port-forward - reliable multiple port forwarding.

Build Template

💡 Idea

$ forward postgresql 5432 redis 6379:6379

Full description of the idea is available here.

🏆 Motivation

Instead of

$ kubectl get pod
NAME                                  READY     STATUS    RESTARTS   AGE
site-5d7f49cf95-zsct2                 4/4       Running   0          1d
catalog-79c558d96-zg6cg               1/1       Running   0          1d
catalog-postgresql-7595dd6b9c-fkrbz   1/1       Running   0          1d
catalog-redis-76bbdf658b-4zdwc        1/1       Running   0          1d
site-redis-b654f56d4-55kvk            1/1       Running   0          1d
site-rabbitmq-7677fdf798-flswj        1/1       Running   0          1d
$ kubectl port-forward catalog-postgresql-7595dd6b9c-fkrbz 5432:5432 &
$ kubectl port-forward catalog-redis-76bbdf658b-4zdwc      6379:6379 &
$ ps x | fgrep 'kubectl port-forward ...' | xargs kill -SIGKILL

It's so boring... (╯°□°)╯︵┻━┻

I want to

$ forward postgresql 5432 redis 6379:6379
which redis?
> catalog-redis-76bbdf658b-4zdwc
  site-redis-b654f56d4-55kvk

🤼‍♂️ How to

asciicast

🧩 Installation

Homebrew

$ brew install kamilsk/tap/forward

Binary

$ curl -sSL https://bit.ly/install-forward | sh
# or
$ wget -qO- https://bit.ly/install-forward | sh

Source

# use standard go tools
$ go get -u github.com/kamilsk/forward
# or use egg tool
$ egg tools add github.com/kamilsk/forward

egg<sup id="anchor-egg">1</sup> is an extended go get.

Bash and Zsh completions

$ forward completion bash > /path/to/bash_completion.d/forward.sh
$ forward completion zsh  > /path/to/zsh-completions/_forward.zsh

<sup id="egg">1</sup> The project is still in prototyping.


made with ❤️ for everyone