forward

command module
v0.0.0-...-cc457c8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2020 License: MIT Imports: 13 Imported by: 0

README

🎳 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

egg1 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

1 The project is still in prototyping.


made with ❤️ for everyone

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL