pai icon indicating copy to clipboard operation
pai copied to clipboard

k8s dashboard crash caused by large docker log

Open hwuu opened this issue 8 years ago • 2 comments

How to reproduce:

  • Step 1. Find a pod in which the docker container has a huge size of log file, say 500 MB.
  • Step 2. Go to the k8s dashboard and check the pod's log. Or use the following API call:
http://<k8s-dashboard>/api/v1/pod/<namespace>/<pod>/log

Then the k8s dashboard will crash.

Possible solution:

  • Limit the docker log size by adding --log-opt max-size=50m flag. Ref: https://stackoverflow.com/a/32091923

hwuu avatar Mar 07 '18 07:03 hwuu

seems to relate to this issue: https://github.com/kubernetes/dashboard/pull/2007

fanyangCS avatar Mar 09 '18 05:03 fanyangCS

resolved in 0.4.0 by upgrading k8s dashboard version.

fanyangCS avatar Apr 17 '18 05:04 fanyangCS