Skip to content

Commit

Permalink
documentation + graphics updates
Browse files Browse the repository at this point in the history
  • Loading branch information
derailed committed Feb 2, 2019
1 parent ae6d339 commit 7129484
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 49 deletions.
27 changes: 11 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -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/>

Expand All @@ -33,27 +33,22 @@ brew install k9s
- [Releases](https://github.com/derailed/k9s/releases)



<br/>

---
## Features

> 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...
## Commands

+ 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)

Expand Down
16 changes: 7 additions & 9 deletions resource/svc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -89,7 +89,6 @@ func (*Service) Header(ns string) Row {
"TYPE",
"CLUSTER-IP",
"EXTERNAL-IP",
"SELECTOR",
"PORT(S)",
"AGE",
)
Expand All @@ -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),
)
Expand Down Expand Up @@ -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, " ")
}
4 changes: 2 additions & 2 deletions views/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
34 changes: 12 additions & 22 deletions views/splash.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,21 @@ const (
)

var logoSmall = []string{

` __ ______ `,
`| | __/ __ \ ______`,
`| |/ /> < / ___/`,
`| </ -- \\___ \ `,
`|__|_ \______ /____ >`,
` \/ \/ \/ `,
` ____ __.________ `,
`| |/ _/ __ \______`,
`| < \____ / ___/`,
`| | \ / /\___ \ `,
`|____|__ \ /____//____ >`,
` \/ \/ `,
}

var logo = []string{
` ____ __. ______ _________ .___`,
`| |/ _|/ __ \ _____\_ ___ \ _____ __| _/`,
`| < > < / ___/ \ \/ / \ / __ | `,
`| | \/ -- \\___ \\ \___| Y Y \/ /_/ | `,
`|____|__ \______ /____ >\______ /__|_| /\____ | `,
` \/ \/ \/ \/ \/ \/ `,
}

var co = []string{
`.__ .__ __ .__ `,
`|__| _____ | |__ _____/ |_ ____ ______ |__| ____ `,
`| |/ \| | \ / _ \ ___/ __ \\____ \ | |/ _ \ `,
`| | Y Y | Y ( <_> | | \ ___/| |_> > | ( <_> )`,
`|__|__|_| |___| /\____/|__| \___ | __/ /\ |__|\____/ `,
` \/ \/ \/|__| \/ `,
` ____ __.________ _________ .____ .___ `,
`| |/ _/ __ \_____\_ ___ \| | | |`,
`| < \____ / ___/ \ \/| | | |`,
`| | \ / /\___ \\ \___| |___| |`,
`|____|__ \ /____//____ >\______ /_______ \___|`,
` \/ \/ \/ \/ `,
}

// Splash screen definition
Expand Down

0 comments on commit 7129484

Please sign in to comment.