Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

No logs in Logs Explorer for pod with sidecar

Pod setup:

The problem is that if we look in the Logs Explorer we don't see any logs coming in for the app container. It is possible to tail the logs directly using `kubectl logs` and watch them come in, but there is nothing in GCP.

We have other containers using the same logging configuration (Go with zlog) and we see those logs in GCP, the difference being there is no init container in those pods.

Have other see similar issues?

 

0 1 322
1 REPLY 1

Hi @drunkenplatypus,

Welcome to Google Cloud Community!

In relation to your concern about kubectl logs, yes it is possible to print the logs for a container in a pod or specified resource. If the pod has only one container, the container name is optional.

For details about searching and viewing logs with the Logs Explorer, see View logs by using the Logs Explorer. Alternatively, you can check this troubleshooting documentation for Google Cloud Logging issues, which outlines common problems and offers guidance on using the Google Cloud console to resolve them and this page provides an overview of how to find and use your Google Kubernetes Engine (GKE) logs.

A post from Stack Overflow, another community forum, might address a similar issue. According to @user162185, it helped him identify the root cause of his problem with the guidance from this documentation shared by Google Support staff member @salvinojr.

You can also refer to these documentations, which might help for future reference.

For further investigation needed in your project, you may reach out to Google Cloud Support for assistance.

Top Labels in this Space