K9s provides a curses based terminal UI to interact with your Kubernetes clusters. The aim of this project is to make it easier to navigate, observe and manage your applications in the wild. K9s continually watches Kubernetes for changes and offers subsequent commands to interact with observed resources.
K9s is available on Linux, OSX and Windows platforms.
Binaries for Linux, Windows and Mac are available as tarballs in the release page.
For OSX using Homebrew
brew tap derailed/k9s && brew install k9s
Building from source
K9s was built using go 1.11 or above. In order to build K9 from source you must:
Clone the repo
Set env var GO111MODULE=on
Add the following command in your go.mod file
replace ( github.com/derailed/k9s => MY_K9S_CLONED_GIT_REPO )
Build and run the executable
go run main.go
The Command Line
# List all available CLI options k9s -h # To get info about K9s runtime (logs, configs, etc..) k9s info # To run K9s in a given namespace k9s -n mybitchns # Start K9s in an existing KubeConfig context k9s --context coolCtx
K9s uses 256 colors terminal mode. On `Nix system make sure TERM is set accordingly.
K9s config file ($HOME/.k9s/config.yml)
K9s keeps its configurations in a dot file in your home directory.
NOTE: This is still in flux and will change while in pre-release stage!
k9s: refreshRate: 2 logBufferSize: 200 currentContext: minikube currentCluster: minikube clusters: bitchn: namespace: active: coolio favorites: - cassandra - default view: active: po minikube: namespace: active: all favorites: - all - kube-system - default view: active: dp
K9s uses aliases to navigate most K8s resources.
||View a Kubernetes resource||
|'?'||Show all command aliases||select+
||Filter out a resource view given a filter||
||Bails out of command mode|
||Key mapping to describe, view, edit, view logs,...||
||To view and switch to another Kubernetes context||
||To bail out of K9s|
This initial drop is brittle. K9s will most likely blow up if...
- You don't have enough RBAC fu to manage your cluster
- Your cluster does not run a metric server.
This is still work in progress! If there is enough interest in the Kubernetes
community, we will enhance per your recommendations/contributions. Also if you
dig this effort, please let us know that too!
K9s sits on top of many of opensource projects and libraries. Our sincere
appreciations to all the OSS contributors that work nights and weekends
to make this project a reality!
Subscribe to Golang Example
Get the latest posts delivered right to your inbox