Can't enable logs for Google Cloud Logging

6/14/2016

I'm using Google Container Engine and trying to add logs like in this guide http://kubernetes.io/docs/getting-started-guides/logging/

There are no logs in logging console, but many messages like this in fluentd pod log

-> kubectl logs -f --tail=5 fluentd-cloud-logging-gke-we-production-da3a3de4-node-s285 --namespace=kube-system 2016-06-14 17:51:21 +0000 [warn]: suppressed same stacktrace 2016-06-14 17:51:28 +0000 [warn]: temporarily failed to flush the buffer. next_retry=2016-06-14 17:51:58 +0000 error_class="Google::APIClient::ClientError" error="The caller does not have permission" plugin_id="object:f9a9ac"

What does permissions it want? Please help me, I really stuck on it

-- Faberge eggs
google-cloud-platform
kubernetes

1 Answer

6/15/2016

It sounds like the fluentd pod is unable to write to the google cloud logging api endpoint. To write logs, the VM must have the https://www.googleapis.com/auth/logging.write scope on the VM's default service account.

-- Robert Bailey
Source: StackOverflow