documentation + graphics updates

mine
derailed 2019-02-01 17:59:56 -07:00
parent ae6d339765
commit 712948417e
4 changed files with 32 additions and 49 deletions

View File

@ -1,12 +1,12 @@
<img src="assets/k9s.png">
# K9s - CLI to manage your Kubernetes clusters.
# K9s - Kubernetes CLI To Manage Your Clusters In Style!
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. This command line app continually watches Kubernetes
for changes and offers subsequent commands to interact with observed resources.
K9s is written in GO and provides a graphical terminal UI to interact with your
Kubernetes clusters. The aim of this project is to make it easier to navigate,
observe and manage your clusters. The CLI continually watches Kubernetes
resources for changes and offers subsequent commands to interact with the
observed resource.
<br/>
@ -33,27 +33,22 @@ brew install k9s
- [Releases](https://github.com/derailed/k9s/releases)
<br/>
---
## Features
## Commands
> Note: k9s does not have an idiot light. Please be sure to hit the correct command
> sequences to avoid pilot errors. `Are you sure?` not in effect here...
+ k9s uses 2 or 3 letters alias to navigate most Kubernetes resources
+ K9s uses 2 or 3 letters alias to navigate most K8s resource
+ At any time you can use `?<Enter>` to look up the various commands
+ Use `alias<Enter>` to activate a resource under that alias
+ Use `Esc` to erase previous keystrokes.
+ Use `Q` or `Ctrl-C` to Quit.
+ `Ctrl` sequences are used to view, edit, delete, ssh ...
+ Use `ctx<Enter>` to see and switch between your clusters
+ Use `ctx<Enter>` to switch between clusters
+ Use `Q` or `Ctrl-C` to Quit.
<br/>
---
## Video Demo
## Demo Video
+ [k9s Demo](https://youtu.be/k7zseUhaXeU)

View File

@ -8,7 +8,7 @@ import (
"github.com/derailed/k9s/resource/k8s"
log "github.com/sirupsen/logrus"
yaml "gopkg.in/yaml.v2"
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
)
// Service tracks a kubernetes resource.
@ -89,7 +89,6 @@ func (*Service) Header(ns string) Row {
"TYPE",
"CLUSTER-IP",
"EXTERNAL-IP",
"SELECTOR",
"PORT(S)",
"AGE",
)
@ -109,7 +108,6 @@ func (r *Service) Fields(ns string) Row {
string(i.Spec.Type),
i.Spec.ClusterIP,
r.toIPs(i.Spec.Type, i.Spec.ExternalIPs),
mapToStr(i.Spec.Selector),
r.toPorts(i.Spec.Ports),
toAge(i.ObjectMeta.CreationTimestamp),
)
@ -140,11 +138,11 @@ func (*Service) toPorts(pp []v1.ServicePort) string {
ports[i] = p.Name + ":"
}
ports[i] += strconv.Itoa(int(p.Port)) +
"->" +
strconv.Itoa(int(p.NodePort)) +
"/" +
string(p.Protocol)
"►" +
strconv.Itoa(int(p.NodePort))
if p.Protocol != "TCP" {
ports[i] += "" + string(p.Protocol)
}
return strings.Join(ports, ",")
}
return strings.Join(ports, " ")
}

View File

@ -79,13 +79,13 @@ func (a *appView) Init() {
header.SetDirection(tview.FlexColumn)
header.AddItem(a.infoView, 25, 1, false)
header.AddItem(a.menuView, 0, 1, false)
header.AddItem(logoView(), 25, 1, false)
header.AddItem(logoView(), 26, 1, false)
}
main := tview.NewFlex()
{
main.SetDirection(tview.FlexRow)
main.AddItem(header, 6, 1, false)
main.AddItem(header, 7, 1, false)
main.AddItem(a.content, 0, 10, true)
main.AddItem(a.flashView, 1, 1, false)
}

View File

@ -14,31 +14,21 @@ const (
)
var logoSmall = []string{
` __ ______ `,
`| | __/ __ \ ______`,
`| |/ /> < / ___/`,
`| </ -- \\___ \ `,
`|__|_ \______ /____ >`,
` \/ \/ \/ `,
` ____ __.________ `,
`| |/ _/ __ \______`,
`| < \____ / ___/`,
`| | \ / /\___ \ `,
`|____|__ \ /____//____ >`,
` \/ \/ `,
}
var logo = []string{
` ____ __. ______ _________ .___`,
`| |/ _|/ __ \ _____\_ ___ \ _____ __| _/`,
`| < > < / ___/ \ \/ / \ / __ | `,
`| | \/ -- \\___ \\ \___| Y Y \/ /_/ | `,
`|____|__ \______ /____ >\______ /__|_| /\____ | `,
` \/ \/ \/ \/ \/ \/ `,
}
var co = []string{
`.__ .__ __ .__ `,
`|__| _____ | |__ _____/ |_ ____ ______ |__| ____ `,
`| |/ \| | \ / _ \ ___/ __ \\____ \ | |/ _ \ `,
`| | Y Y | Y ( <_> | | \ ___/| |_> > | ( <_> )`,
`|__|__|_| |___| /\____/|__| \___ | __/ /\ |__|\____/ `,
` \/ \/ \/|__| \/ `,
` ____ __.________ _________ .____ .___ `,
`| |/ _/ __ \_____\_ ___ \| | | |`,
`| < \____ / ___/ \ \/| | | |`,
`| | \ / /\___ \\ \___| |___| |`,
`|____|__ \ /____//____ >\______ /_______ \___|`,
` \/ \/ \/ \/ `,
}
// Splash screen definition