- kubectl with access to Kubernetes cluster
- And... that's it!
kube-commander | kubernetes-dashboard | |
---|---|---|
Easy to use | ✔️ | ✔️ |
Realtime data update | ✔️ | ✖️ |
Doesn't require deployment | ✔️ | ✖️ |
Doesn't require web access to cluster | ✔️ | ✖️ |
Can be used over SSH | ✔️ | ✖️ |
Responsiveness | ⚡ | 🐢 |
Suitable for hackers | ✔️ | ✖️ |
sudo snap install kube-commander
If you use Archlinux you can install kube-commander from AUR with your favorite AUR helper:
yay -S kube-commander
You can install kube-commander from binary release for your OS. Linux, macOS and Windows are supported. You can find a package for your OS on Releases page.
- Untar archive on your machine
- Put kube-commander executable in your
$PATH
. E.g./usr/local/bin
NOTE: if you use Windows make sure you have installed Git Bash to support editing, viewing logs and etc.
If you have Go environment configured you can install kube-commander easily with this command:
go get -u github.com/AnatolyRugalev/kube-commander/cmd/kube-commander
NOTE: Make sure your $PATH
has $GOPATH/bin
in it.
Before starting kube-commander make sure you have proper kubectl configuration:
kubectl cluster-info
Then you can start kube-commander:
kube-commander
To start kube-commander with non-default kubectl context, namespace or config itself you can use this flags and env vars:
Flag | Env var | Description |
---|---|---|
kubeconfig | KUBECONFIG | Path to kubeconfig |
context | KUBECONTEXT | Context name |
namespace | KUBENAMESPACE | Initial namespace to show |
editor | EDITOR | Name of the editor binary. Default: "vi". But you probably already have one defined by your OS |
pager | PAGER | Name of the pager binary. Default: "less" |
kubectl | KUBECTL | Name of kubectl binary. Default: "kubectl" |
Example:
kube-commander --context=my-cluster-2 --namespace=my-namespace --kubeconfig=~/.kube/my-config
Or:
export KUBECONFIG=$HOME/.kube/my-config
export KUBECONTEXT=my-cluster-2
export KUBENAMESPACE=my-namespace
kube-commander
For now kube-commander shows limited number of resources, but technically, it can show anything kubectl can. On kube-commander start you can see that some items in the menu are gray. This happens because kube-commander needs some time to discover your cluster capabilities. This behavior could be configurable in future releases. Also we could allow to add your custom resource types into the menu via this configuration.
The first thing you need to press is "?". This will show help dialog in case you missed it on start screen.
The initial version of kube-commander had a refresh key which updated list of resources. Now you don't have to do that: kube-commander watches changes dynamically, so you can relax and take a sip of your coffee while waiting for a deployment.
The most of hotkeys you can find on help dialog. Here they are:
Key | Action |
---|---|
? | Show help dialog |
↑↓→← | Navigation. When table doesn't fit to the screen, use ← and → to scroll horizontally |
Enter | Select menu item |
Esc, Backspace | Go back |
Q, Ctrl+C | Quit |
Ctrl+N, F2 | Switch namespace |
Ctrl+R | Force list refresh (e.g. in case connection was closed) |
D | Describe selected resource with kubectl describe |
E | Edit selected resource with kubectl edit |
Delete | Delete selected resource (then press "y" to confirm) |
C | Copy resource name to the clipboard |
/ | Enter filtering mode. Type string and then press Enter to confirm |
Ctrl+P | Switch to pods |
Ctrl+D | Switch to deployments |
Ctrl+I | Switch to ingresses |
L | Show pod logs |
Shift+L | Show previous pod logs |
F | Forward pod port |
S | Enter to container /bin/sh shell |
We play by gentleman rules. If you want to contribute a code - please file an issue describing your intentions first. This way we can avoid wasting time doing easy work the hard way. I'm always open to give my point of view on your ideas.
- tcell - TUI library
- termui - the first version of kube-commander was build around this TUI library
- Goreleaser - helps to ship go software
- k9s - another kubernetes TUI utility