Skip to content

Commit 6a5af5b

Browse files
committed
[chore] Improve README
1 parent 6c9a8c5 commit 6a5af5b

File tree

1 file changed

+45
-44
lines changed

1 file changed

+45
-44
lines changed

README.md

+45-44
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ An interactive Kubernetes log viewer for your terminal.
1414
* Select containers interactively or auto-select by pattern matching against names, labels, and more
1515
* See cluster changes in real time
1616
* Navigate logs from multiple containers interleaved by timestamp
17-
* Search logs by exact string or regex pattern. Include surrounding context or show matching lines only
17+
* Search logs by exact string or regex pattern. Show or hide surrounding context
1818
* Zoom in and flip through single formatted logs one by one
1919
* Archive and share: save logs to a local file or copy a log to your clipboard
2020

2121
Comparable to:
2222

23-
* [k9s](https://k9scli.io/) but focused on logs
2423
* [kubectl logs](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_logs/) supercharged
25-
* [stern](https://github.com/stern/stern) & [kail](https://github.com/boz/kail) but multi-cluster and an interactive
24+
* [k9s](https://k9scli.io/) but specializing in logs
25+
* [stern](https://github.com/stern/stern) & [kail](https://github.com/boz/kail) but multi-cluster and with an interactive
2626
interface
2727

2828
## Usage
@@ -32,66 +32,67 @@ Comparable to:
3232
Examples:
3333

3434
```shell
35-
# Use the current kubernetes context. If context namespace doesn't exist, uses `default`
35+
# Use the current kubernetes context, defaulting to `default`
3636
kl
3737

3838
# Use context `my-context`, all namespaces
3939
kl --context my-context -A
4040

41-
# Use contexts `my-context` & `other-context`, namespaces `default` & `other-ns` in each
41+
# Use contexts `my-context` & `other-context`, namespaces `default` & `other-ns` in each context
4242
kl --context my-context,other-context -n default,other-ns
4343

44-
# Auto-select all containers in a with a pod owner (e.g. deployment) containing the word `nginx`
44+
# Auto-select containers with a pod owner (e.g. deployment) containing the word `nginx`
4545
kl --mown nginx
4646

47-
# Auto-select all containers with the exact name of `my-container`, limited to 10 selections
47+
# Auto-select containers with the exact name `my-container`, limited to 10 containers
4848
kl --mc "^my-container$" --limit 10
4949

50-
# Auto-select all containers that have labels app=flask and either tier=stage or tier=prod
50+
# Auto-select containers that have labels app=flask and either tier=stage or tier=prod
5151
kl -l 'app=flask,tier in (stage, prod)'
5252

53-
# Ignore all containers with the exact name of `my-sidecar`
53+
# Ignore containers with the exact name of `my-sidecar`
5454
kl --ic "^my-sidecar$"
5555

56-
# Start on the logs page, ordered by timestamp descending, showing logs from 10 minutes ago onwards
56+
# Start focused on logs, ordered by timestamp descending, showing logs from 10 minutes ago onwards
5757
kl --mc "^my-container$" -d --logs-view --since 10m
5858
```
5959

6060
Press `?` in any view to see keyboard shortcuts specific to the current view and across the application.
6161

62-
| Key | Action |
63-
|--------|-------------------------------------------------|
64-
| ↓/j | down one line |
65-
| ↑/k | up one line |
66-
| d | down half page |
67-
| u | up half page |
68-
| f | down full page |
69-
| b | up full page |
70-
| g | go to top (will follow logs if descending) |
71-
| G | go to bottom (will follow logs if ascending) |
72-
| l | focus on logs view |
73-
| L | focus on logs view in fullscreen |
74-
| enter | zoom in to single log view for selected log |
75-
| esc | back to all logs view when viewing single log |
76-
| s | focus on container selection view |
77-
| S | focus on container selection view in fullscreen |
78-
| F | toggle fullscreen |
79-
| / | edit exact match filter |
80-
| r | edit regex filter |
81-
| enter | when filtering, apply filter |
82-
| esc | discard applied filter |
83-
| n | next filter match |
84-
| N | previous filter match |
85-
| x | toggle showing only the logs matching filter |
86-
| w | toggle line wrap |
87-
| o | reverse timestamp ordering |
88-
| p | pause/resume log stream |
89-
| t | change timestamp format |
90-
| c | change container name format |
91-
| 0-9 | change time from which logs begin |
92-
| ctrl+s | save focused view to local file |
93-
| ctrl+y | in single log view, copy to clipboard |
94-
| ? | show/hide help |
62+
| Key | Action |
63+
|---------|-------------------------------------------------|
64+
| ↓/j | down one line |
65+
| ↑/k | up one line |
66+
| d | down half page |
67+
| u | up half page |
68+
| f | down full page |
69+
| b | up full page |
70+
| g | go to top (will follow logs if descending) |
71+
| G | go to bottom (will follow logs if ascending) |
72+
| l | focus on logs view |
73+
| L | focus on logs view in fullscreen |
74+
| enter | zoom in to single log view for selected log |
75+
| esc | back to all logs view when viewing single log |
76+
| s | focus on container selection view |
77+
| S | focus on container selection view in fullscreen |
78+
| F | toggle fullscreen |
79+
| / | edit exact match filter |
80+
| r | edit regex filter |
81+
| enter | when filtering, apply filter |
82+
| esc | discard applied filter |
83+
| n | next filter match |
84+
| N | previous filter match |
85+
| x | toggle showing only the logs matching filter |
86+
| w | toggle line wrap |
87+
| ←/→/h/l | pan left/right when not wrapped |
88+
| o | reverse timestamp ordering |
89+
| p | pause/resume log stream |
90+
| t | change timestamp format |
91+
| c | change container name format |
92+
| 0-9 | change time from which logs begin |
93+
| ctrl+s | save focused view to local file |
94+
| ctrl+y | in single log view, copy to clipboard |
95+
| ? | show/hide help |
9596

9697
## Installation
9798

@@ -150,7 +151,7 @@ cd kl
150151
go build # outputs ./kl executable
151152
```
152153

153-
Running a an example flask + postgres + nginx setup in a local [k3d](https://k3d.io/) cluster for testing locally:
154+
Run an example flask + postgres + nginx setup in a local [k3d](https://k3d.io/) cluster for testing locally:
154155

155156
```sh
156157
k3d cluster create test

0 commit comments

Comments
 (0)