2

I've started using k9s, a TUI for exploring a kubernetes cluster.

When I use it to view logs, it however only shows me around 50-100 lines, instead of all the logs, or at least a decent chunk of them. This makes the log viewer quite useless.

How do I fix this?

A partial fix is to change the config k9s.logger.tail to a value higher than 100.

One can find the location of the config file through k9s info:

$ k9s info
 ____  __.________
|    |/ _/   __   \______
|      < \____    /  ___/
|    |  \   /    /\___ \
|____|__ \ /____//____  >
        \/            \/

Version:           0.32.5
Config:            /Users/corneliusromer/Library/Application Support/k9s/config.yaml
Custom Views:      /Users/corneliusromer/Library/Application Support/k9s/views.yaml
Plugins:           /Users/corneliusromer/Library/Application Support/k9s/plugins.yaml
Hotkeys:           /Users/corneliusromer/Library/Application Support/k9s/hotkeys.yaml
Aliases:           /Users/corneliusromer/Library/Application Support/k9s/aliases.yaml
Skins:             /Users/corneliusromer/Library/Application Support/k9s/skins
Context Configs:   /Users/corneliusromer/Library/Application Support/k9s/clusters
Logs:              /Users/corneliusromer/Library/Application Support/k9s/k9s.log
Benchmarks:        /Users/corneliusromer/Library/Application Support/k9s/benchmarks
ScreenDumps:       /Users/corneliusromer/Library/Application Support/k9s/screen-dumps

Then editing the line:

k9s:
  ...
  logger:
    tail: 5000 <--- increase from 100 to say 5000
    buffer: 5000
    sinceSeconds: -1
    textWrap: false
    showTime: false

This will work sometimes, but not reliable in my experience. A proper, real fix would be welcome.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.