Skip to content

Commit 7129484

Browse files
committed
documentation + graphics updates
1 parent ae6d339 commit 7129484

File tree

4 files changed

+32
-49
lines changed

4 files changed

+32
-49
lines changed

README.md

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<img src="assets/k9s.png">
22

3-
# K9s - CLI to manage your Kubernetes clusters.
3+
# K9s - Kubernetes CLI To Manage Your Clusters In Style!
4+
5+
K9s provides a curses based terminal UI to interact with your Kubernetes clusters.
6+
The aim of this project is to make it easier to navigate, observe and manage
7+
your applications. This command line app continually watches Kubernetes
8+
for changes and offers subsequent commands to interact with observed resources.
49

5-
K9s is written in GO and provides a graphical terminal UI to interact with your
6-
Kubernetes clusters. The aim of this project is to make it easier to navigate,
7-
observe and manage your clusters. The CLI continually watches Kubernetes
8-
resources for changes and offers subsequent commands to interact with the
9-
observed resource.
1010

1111
<br/>
1212

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

3535

36-
3736
<br/>
3837

3938
---
40-
## Features
41-
42-
> Note: k9s does not have an idiot light. Please be sure to hit the correct command
43-
> sequences to avoid pilot errors. `Are you sure?` not in effect here...
39+
## Commands
4440

45-
+ k9s uses 2 or 3 letters alias to navigate most Kubernetes resources
41+
+ K9s uses 2 or 3 letters alias to navigate most K8s resource
4642
+ At any time you can use `?<Enter>` to look up the various commands
4743
+ Use `alias<Enter>` to activate a resource under that alias
48-
+ Use `Esc` to erase previous keystrokes.
49-
+ Use `Q` or `Ctrl-C` to Quit.
5044
+ `Ctrl` sequences are used to view, edit, delete, ssh ...
51-
+ Use `ctx<Enter>` to see and switch between your clusters
45+
+ Use `ctx<Enter>` to switch between clusters
46+
+ Use `Q` or `Ctrl-C` to Quit.
5247

5348
<br/>
5449

5550
---
56-
## Video Demo
51+
## Demo Video
5752

5853
+ [k9s Demo](https://youtu.be/k7zseUhaXeU)
5954

resource/svc.go

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/derailed/k9s/resource/k8s"
99
log "github.com/sirupsen/logrus"
1010
yaml "gopkg.in/yaml.v2"
11-
"k8s.io/api/core/v1"
11+
v1 "k8s.io/api/core/v1"
1212
)
1313

1414
// Service tracks a kubernetes resource.
@@ -89,7 +89,6 @@ func (*Service) Header(ns string) Row {
8989
"TYPE",
9090
"CLUSTER-IP",
9191
"EXTERNAL-IP",
92-
"SELECTOR",
9392
"PORT(S)",
9493
"AGE",
9594
)
@@ -109,7 +108,6 @@ func (r *Service) Fields(ns string) Row {
109108
string(i.Spec.Type),
110109
i.Spec.ClusterIP,
111110
r.toIPs(i.Spec.Type, i.Spec.ExternalIPs),
112-
mapToStr(i.Spec.Selector),
113111
r.toPorts(i.Spec.Ports),
114112
toAge(i.ObjectMeta.CreationTimestamp),
115113
)
@@ -140,11 +138,11 @@ func (*Service) toPorts(pp []v1.ServicePort) string {
140138
ports[i] = p.Name + ":"
141139
}
142140
ports[i] += strconv.Itoa(int(p.Port)) +
143-
"->" +
144-
strconv.Itoa(int(p.NodePort)) +
145-
"/" +
146-
string(p.Protocol)
147-
141+
"" +
142+
strconv.Itoa(int(p.NodePort))
143+
if p.Protocol != "TCP" {
144+
ports[i] += "╱" + string(p.Protocol)
145+
}
148146
}
149-
return strings.Join(ports, ",")
147+
return strings.Join(ports, " ")
150148
}

views/app.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ func (a *appView) Init() {
7979
header.SetDirection(tview.FlexColumn)
8080
header.AddItem(a.infoView, 25, 1, false)
8181
header.AddItem(a.menuView, 0, 1, false)
82-
header.AddItem(logoView(), 25, 1, false)
82+
header.AddItem(logoView(), 26, 1, false)
8383
}
8484

8585
main := tview.NewFlex()
8686
{
8787
main.SetDirection(tview.FlexRow)
88-
main.AddItem(header, 6, 1, false)
88+
main.AddItem(header, 7, 1, false)
8989
main.AddItem(a.content, 0, 10, true)
9090
main.AddItem(a.flashView, 1, 1, false)
9191
}

views/splash.go

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,31 +14,21 @@ const (
1414
)
1515

1616
var logoSmall = []string{
17-
18-
` __ ______ `,
19-
`| | __/ __ \ ______`,
20-
`| |/ /> < / ___/`,
21-
`| </ -- \\___ \ `,
22-
`|__|_ \______ /____ >`,
23-
` \/ \/ \/ `,
17+
` ____ __.________ `,
18+
`| |/ _/ __ \______`,
19+
`| < \____ / ___/`,
20+
`| | \ / /\___ \ `,
21+
`|____|__ \ /____//____ >`,
22+
` \/ \/ `,
2423
}
2524

2625
var logo = []string{
27-
` ____ __. ______ _________ .___`,
28-
`| |/ _|/ __ \ _____\_ ___ \ _____ __| _/`,
29-
`| < > < / ___/ \ \/ / \ / __ | `,
30-
`| | \/ -- \\___ \\ \___| Y Y \/ /_/ | `,
31-
`|____|__ \______ /____ >\______ /__|_| /\____ | `,
32-
` \/ \/ \/ \/ \/ \/ `,
33-
}
34-
35-
var co = []string{
36-
`.__ .__ __ .__ `,
37-
`|__| _____ | |__ _____/ |_ ____ ______ |__| ____ `,
38-
`| |/ \| | \ / _ \ ___/ __ \\____ \ | |/ _ \ `,
39-
`| | Y Y | Y ( <_> | | \ ___/| |_> > | ( <_> )`,
40-
`|__|__|_| |___| /\____/|__| \___ | __/ /\ |__|\____/ `,
41-
` \/ \/ \/|__| \/ `,
26+
` ____ __.________ _________ .____ .___ `,
27+
`| |/ _/ __ \_____\_ ___ \| | | |`,
28+
`| < \____ / ___/ \ \/| | | |`,
29+
`| | \ / /\___ \\ \___| |___| |`,
30+
`|____|__ \ /____//____ >\______ /_______ \___|`,
31+
` \/ \/ \/ \/ `,
4232
}
4333

4434
// Splash screen definition

0 commit comments

Comments
 (0)