k9s logs don't go to latest logs

Created on 20 Aug 2020  路  5Comments  路  Source: derailed/k9s






Describe the bug
When tailing the logs, it doesn't follow the latest logs. Instead it scrolls through the past few logs before getting to the latest logs.

This started happening after upgrading

To Reproduce
1- Open an pod with many logs like something within kube-system
2- Tail the logs of the container by pressing enter

Expected behavior
On logs, it should go to the latest logs not scroll through a few logs before reaching the latest logs.

Ideally it should start from the latest logs like doing a tail -f

Screenshots
If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

  • OS: 10.15.6
  • K9s: 0.21.7
  • K8s: v1.16.10
    Additional context
    No special configs has ben put in place
question

Most helpful comment

@mbfisher Great catch! I'll fix in the next drop. Thanks for the heads up!

All 5 comments

Same for me. The only solution that I found :

  • go in the logs of a pod
  • press the S key to disable the autoscroll
  • press the 1 key to get the more recent logs
  • press the S key to enable the autoscroll

@rchenzheng @mel1nn Thank you for the issue! This is on par with how kubectl and tail -n -f works, I think... ie by default we display the n latest lines. You can configure this setting by either doing what @mel1nn suggested or in your .k9s config set the logger configuration. I think the default is to show the last 100 lines of logs.

I've just installed k9s for the first time - version 0.21.7. The default config file has a value of -1 for k9s.logger.sinceSeconds, which was fetching thousands of logs. Is this a bug? The docs say the default should be 5mins.

@mbfisher Great catch! I'll fix in the next drop. Thanks for the heads up!

@mbfisher Fixed v0.21.8!

Was this page helpful?
0 / 5 - 0 ratings