K9s: Missing container logs from k9s

Created on 13 Jun 2019  路  4Comments  路  Source: derailed/k9s






Describe the bug
When I check a pod's log from K9s not all the entries are showing. This was working before the k9s version that joins all the container logs from a pod.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a pod
  2. Click on 'l' for logs
  3. Check the output
  4. Now, outside of k9s, use kubectl logs pod-name
  5. Check that kubectl shows a lot more entries than k9s

Expected behavior
The logs from k9s and kubectl should be the same.

Versions (please complete the following information):

  • OS: OSX
  • K9s: 0.7.6
  • K8s 1.12.9
question

All 4 comments

@GMartinez-Sisti Rights K9s tail the logs to the last x lines based on K9s configuration option logRequestSize given the potential log volumes. This value defaults to the last 200 is not set.

@derailed thanks! I did not know that!

Let me try that and get back to you. I have the impression that some containers are just showing a few lines, even though there are more than 200.

UPDATE: This is working fine when there is only one container in the pod. If there are more the logs will be truncated in an unpredictable way.

As an example, if I have an init-container (completed) with 20 log lines and a regular container (running) with 200 plus log lines, the init-container will show less than 20 lines and the remaining log entries will be truncated to limit according to config. Ideally this would show all the 200 from init-container and then the remaining entries from the other container until it reaches the configured limit.

WDYT?

@GMartinez-Sisti I think you're right and I found an issue in the loggers synchronization. I think this is now fixed. Please give 0.7.10 a rinse. Thank you!!

Was this page helpful?
0 / 5 - 0 ratings