GKE Logs not showing on Logs explorer | C2C Community
Solved

GKE Logs not showing on Logs explorer

  • 26 June 2023
  • 6 replies
  • 50 views

Userlevel 3
Badge

Hi Everyone,

 

I have a standard GKE cluster deployed, i can see the logs on argocd and also when I use kubectl logs I can see the logs, but I can’t see the logs on logs explorer.
- The cluster SA has all the required logging permission
- The oauth scopes of the nodes has all the logging and monitoring permission 
- the cloud logging API is enabled.

I have done all this setting but still the logs explorer shows no data found, but I do have the same setting in another project and this works totally fine.

Any Idea what I could be missing.

Thank you.

icon

Best answer by malamin 26 June 2023, 16:06

View original

6 replies

Userlevel 7
Badge +35

Hi @Livingstone ,

Thank you to be here. You did not mention here your GKE clusters running on Google Cloud or externally in your project. Here are some key notes below and reference links it might lead you to find the solution.

  • Ensure you are an Owner of the project containing your cluster.

  • Ensure you have enabled the Cloud Logging API.

Cloud Operations for GKE only displays information for GKE clusters running on Google Cloud. It doesn't display information for GKE clusters running anywhere else, for example using on-premise or bare-metal servers.

If your metrics scope is configured with a VPC Service Controls Service Perimeter for the Monitoring API, then Cloud Operations for GKE won't work for GKE clusters outside the perimeter. To learn more about Service Perimeters, see Service perimeter details and configuration.

Also, Security logs, including basic audit logs, are available for GKE and most other Google Cloud services even when Cloud Logging is not enabled for a GKE cluster. For more information, see Cloud Audit Logs.

GKE troubleshoot link

https://cloud.google.com/kubernetes-engine/docs/troubleshooting/troubleshooting-gke-logging

 

Reference Links:

https://cloud.google.com/blog/products/management-tools/finding-your-gke-logs

https://cloud.google.com/stackdriver/docs/solutions/gke/managing-logs#defaults

https://cloud.google.com/stackdriver/docs/solutions/gke/installing#kind-of-support

https://cloud.google.com/kubernetes-engine/docs/how-to/linux-auditd-logging

Qwiklab

https://www.cloudskillsboost.google/focuses/10910?locale=zh_TW&parent=catalog&qlcampaign=datasci87

 

Userlevel 7
Badge +26

Hi there, @Livingstone ! Did @malamin’s answer perhaps help?

 

(Thank you, @malamin ! ) 

Userlevel 3
Badge

Thank you ! @malamin , I would checkout the suggestions and give feedback

Userlevel 7
Badge +35

It was my pleasure, @Dimitris Petrakis  and @Livingstone.

Userlevel 3
Badge

Thank you @malamin , most of the suggestion you sent I had done them earlier but no joy, but I had edited the log sinks bucket setting by removing the exceptions and now I can see the logs.

Userlevel 7
Badge +35

Well done! I'm happy to hear that you solved the problem. @Livingstone .

Reply