I am trying to get the output of my pod logs into Stackdriver, but I am running into an issue where they are not being sent to Stackdriver.
If I look at the GKE cluster details, it is showing this:
Stackdriver Logging - Disabled
Stackdriver Monitoring - Enabled
I cannot find any information on how to enable Stackdriver on a running cluster.
There is a running heapster pod, and I have run this command as this wasn't set:
gcloud container clusters update <cluster> --monitoring-service=monitoring.googleapis.com
That is now showing the correct service, but this doesn't solve the logging issue. Is anyone able to shed any light on how to enable to logging?
Thanks
Currently there is no support for enabling logging in GKE cluster after it's been created. We are aware of the problem and we're going to introduce such possibility.
In the meantime you can try the following workarounds:
Please let me know if you have more questions. Apologies for the inconvenience.
Do you have the Strackdriver api enabled in your project?
https://console.cloud.google.com/apis/api/logging.googleapis.com/overview
I don't see an option anywhere to specifically enable Stackdriver logging after you've already created the cluster. When you create a new cluster the option is on by default, so I guess recreating it is one option.