updated documentation

mine
derailed 2019-02-21 09:27:38 -07:00
parent 9253a37654
commit b81ef11ab8
7 changed files with 98 additions and 110 deletions

186
README.md
View File

@ -4,41 +4,49 @@
K9s provides a curses based terminal UI to interact with your Kubernetes clusters. 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 The aim of this project is to make it easier to navigate, observe and manage
your applications. This command line app continually watches Kubernetes your applications in the wild. K9s continually watches Kubernetes
for changes and offers subsequent commands to interact with observed resources. for changes and offers subsequent commands to interact with observed resources.
<br/>
--- ---
[![Go Report Card](https://goreportcard.com/badge/github.com/derailed/k9s?)](https://goreportcard.com/report/github.com/derailed/k9s) [![Go Report Card](https://goreportcard.com/badge/github.com/derailed/k9s?)](https://goreportcard.com/report/github.com/derailed/k9s)
[![Build Status](https://travis-ci.com/derailed/k9s.svg?branch=master)](https://travis-ci.com/derailed/k9s) [![Build Status](https://travis-ci.com/derailed/k9s.svg?branch=master)](https://travis-ci.com/derailed/k9s)
<br/>
--- ---
## Installation ## Installation
1. Homebrew (OSX) K9s is available on Linux, OSX and Windows platforms.
```shell * Binaries for Linux, Windows and Mac are available as tar balls in the [release](https://github.com/derailed/k9s/releases) page.
brew tap derailed/k9s && brew install k9s
```
1. Binary Releases * For OSX using Homebrew
- [Releases](https://github.com/derailed/k9s/releases) ```shell
brew tap derailed/k9s && brew install k9s
```
1. Running from source * Building from source
K9s was built using go 1.11 or above. In order to build K9 from source you must:
1. Clone the repo
2. Set env var *GO111MODULE=on*
3. Add the following command in your go.mod file
- You will need to use go 1.11+ ```text
- GO111MODULE=on replace (
github.com/derailed/k9s => MY_K9S_CLONED_GIT_REPO
)
```
<br/> 4. Build and run the executable
```shell
go run main.go
```
--- ---
## Command Line
## The Command Line
```shell ```shell
# List all available CLI options # List all available CLI options
@ -47,11 +55,12 @@ k9s -h
k9s info k9s info
# To run K9s in a given namespace # To run K9s in a given namespace
k9s -n mybitchns k9s -n mybitchns
# Start K9s in an existing KubeConfig context
k9s --context coolCtx
``` ```
<br/>
--- ---
## PreFlight Checks ## PreFlight Checks
* K9s uses 256 colors terminal mode. On `Nix system make sure TERM is set accordingly. * K9s uses 256 colors terminal mode. On `Nix system make sure TERM is set accordingly.
@ -60,116 +69,97 @@ k9s -n mybitchns
export TERM=xterm-256color export TERM=xterm-256color
``` ```
* For clusters with many namespaces you can either edit ~/.k9s/config.yml or ---
go to the namespace(ns) view to switch your default namespace to your namespace
of choice using *Ctrl-S*witch. K9s keeps your top 10 favorite namespaces.
Namespaces will get evicted from the top 10 list, based on your namespace
switching frequency.
## 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!
```yaml ```yaml
k9s: k9s:
refreshRate: 5 # K9s refresh rate in secs refreshRate: 2
logBufferSize: 200 # Size of the logs buffer. Try to keep a sensible default! logBufferSize: 200
currentContext: minikube
currentCluster: minikube
clusters:
bitchn:
namespace: namespace:
active: myCoolNS # Current active namespace name active: coolio
favorites: # List of your 10 most frequently used namespaces favorites:
- myCoolNS1 - cassandra
- myCoolNS2
- all
- default - default
- kube-system
view: view:
active: po # Active resource view active: po
minikube:
namespace:
active: all
favorites:
- all
- kube-system
- default
view:
active: dp
``` ```
* K9s can use **$KUBECONFIG** env var to load cluster information. However we've
seen hill effects of using this env with multiple files as setting the current
context may not update the correct file when using this technique.
--- ---
<br/>
--- ## Key Bindings
## Usage
K9s uses 2 or 3 letters alias to navigate most K8s resource. K9s uses aliases to navigate most K8s resources.
| Command | Result | Example | | Command | Result | Example |
|-------------------|----------------------------------------------------|------------------| |-----------------------|----------------------------------------------------|----------------------------|
| `:`alias`<ENTER>` | List a Kubernetes resource in the active namespace | `:po<ENTER>` | | `:`alias`<ENTER>` | View a Kubernetes resource | `:po<ENTER>` |
| '?' | Show all command aliases | | | '?' | Show all command aliases | select+<ENTER> to view |
| `/`filter`ENTER`> | Filter out a resource view given a filter | `/bumblebeetuna` | | `/`filter`ENTER`> | Filter out a resource view given a filter | `/bumblebeetuna` |
| `<Esc>` | Bails out of command mode | | | `<Esc>` | Bails out of command mode | |
| `v`, `e`, `l`,... | Key mapping to view, edit, see logs, etc... | `l` (view logs) | | `d`,`v`, `e`, `l`,... | Key mapping to describe, view, edit, view logs,... | `d` (describes a resource) |
| `:`ctx`<ENTER>` | To view and switch to another Kubernetes cluster | | | `:`ctx`<ENTER>` | To view and switch to another Kubernetes context | `:`+`ctx`+`<ENTER>` |
| `q`, `Ctrl-c` | To bail out of K9s | | | `q`, `Ctrl-c` | To bail out of K9s | |
<br/>
--- ---
## Building From Source
K9s was built using go 1.11. In order to build K9 from source:
+ Clone the repo
+ Add the following command in your go.mod file
```text
replace (
github.com/derailed/k9s => MY_K9S_CLONED_REPO
)
```
+ Build and run the executable
```shell
go run main.go
```
<br/>
---
## Demo Video ## Demo Video
+ [k9s Demo](https://youtu.be/k7zseUhaXeU) 1. [K9s Demo](https://youtu.be/k7zseUhaXeU)
<br/> ## Screenshots
1. Pods
<img src="assets/screen_po.png">
1. Logs
<img src="assets/screen_logs.png">
1. Deployments
<img src="assets/screen_dp.png">
--- ---
## Screen Shots
### Pod View ## Known Issues
<img src="assets/screen_3.png">
### Log View
<img src="assets/screen_4.png">
<br/>
---
## Known Issues...
This initial drop is brittle. K9s will most likely blow up if... This initial drop is brittle. K9s will most likely blow up if...
+ K9s does not support multiple cluster config specified via KUBECONFIG env var 1. You don't have enough RBAC fu to manage your cluster
+ You don't have enough RBAC fu to manage your cluster 2. Your cluster does not run a metric server.
+ Your cluster does not run a metrics-server
<br/>
--- ---
## Disclaimer ## Disclaimer
This is still work in progress! If there is enough interest in the Kubernetes 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 community, we will enhance per your recommendations/contributions. Also if you
dig this effort, please let us know that too! dig this effort, please let us know that too!
<br/>
--- ---
## ATTA Girls/Boys! ## ATTA Girls/Boys!
K9s sits on top of many of opensource projects and libraries. Our *sincere* K9s sits on top of many of opensource projects and libraries. Our *sincere*
@ -177,17 +167,15 @@ appreciations to all the OSS contributors that work nights and weekends
to make this project a reality! to make this project a reality!
<br/> ---
## Contact Info
1. **Email**: fernand@imhotep.io
1. **Twitter**: [@kitesurfer](https://twitter.com/kitesurfer?lang=en)
--- ---
## Contact Information
+ **Email**: fernand@imhotep.io
+ **Twitter**: [@kitesurfer](https://twitter.com/kitesurfer?lang=en)
+ **Web**: [K9s](https://k9ss.io)
<br/>
---
<img src="assets/imhotep_logo.png" width="32" height="auto"/> © 2018 Imhotep Software LLC. <img src="assets/imhotep_logo.png" width="32" height="auto"/> © 2018 Imhotep Software LLC.
All materials licensed under [Apache v2.0](http://www.apache.org/licenses/LICENSE-2.0) All materials licensed under [Apache v2.0](http://www.apache.org/licenses/LICENSE-2.0)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 252 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 KiB

BIN
assets/screen_dp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
assets/screen_logs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

BIN
assets/screen_po.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB