Get Kubernetes Errors and Logs on GCE

6/20/2017

We would need to get error events (like pod x is stuck in a crash loop, etc.) from Kubernetes itself. On Google Container Engine we can not find those logs anywhere and therefor can not add monitoring to it.

Those Logs are usually provided by the API Server etc. which is not included in Google Logging. Is there a way of achieving what we need? Additionally it would be good to have those K8s Errors in the GCE Error Reporting.

-- kwiesmueller
google-cloud-platform
google-kubernetes-engine
kubernetes
logging
stackdriver

2 Answers

6/22/2017

you can run hyperkube docker image with Docker CMD watch -n 10 kubectl describe pod <podname>

-- gaurav9
Source: StackOverflow

6/20/2017

Mmm... kubectl describe pod and kubectl logs pod should work for you. What I learned about using them came from

https://kukulinski.com/10-most-common-reasons-kubernetes-deployments-fail-part-1/

and references therein

-- Severin Pappadeux
Source: StackOverflow