Report this

What is the reason for this report?

How To Send Kubernetes Logs to Google Cloud

Posted on December 14, 2021

Hi. I’m teaching myself Kubernetes and so far I was able to set up one and deploy a few small projects to it.

Before moving forward, I would like to collect and forward ALL logs to Google Cloud for safekeeping. I’m doing this since I will most likely destroy and recreate the clusters as I learn. (The logs will serve as my notes.)

So far, the solutions I’ve found are vendor-specific meaning GKE->Google Logs or AWS EKS->Cloudwatch. Or Elasticsearch-centric which is too advanced (and expensive) for me at this point.

Any advice or insight would be highly appreciated. Thanks!



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there,

It’s fantastic that you’re diving into Kubernetes and exploring ways to collect and forward logs to Google Cloud for analysis and safekeeping. Since you’re looking for a solution that’s not vendor-specific and more accessible than setting up an Elasticsearch stack, you might want to consider using Fluentd, a popular open-source data collector for unified logging layers.

Fluentd can be easily deployed in your Kubernetes cluster and configured to send logs to Google Cloud’s logging services:

https://www.digitalocean.com/community/tutorials/how-to-set-up-an-elasticsearch-fluentd-and-kibana-efk-logging-stack-on-kubernetes

An alternative option is to use Robusta, here is a step-by-step guide on how to set it all up:

https://docs.digitalocean.com/developer-center/digitalocean-kubernetes-monitoring-made-easy-using-robusta/

Best,

Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.