GoogleCloudPlatform / k8s-stackdriver

Apache License 2.0
390 stars 211 forks source link

Failed to send request to Stackdriver #391

Open gennway opened 3 years ago

gennway commented 3 years ago

Hi, I followed the guide https://kubernetes.io/docs/tasks/debug-application-cluster/events-stackdriver/ and it seems like pod doesn't send events to stackdriver, and there are errors from container logs "1 writer.go:94] Failed to send request to Stackdriver: googleapi: Error 403: The caller does not have permission, forbidden" GKE's service account has enough permissions I guess "Monitoring Admin + Monitoring Metric Writer" so what am I doing wrong? 1.17.12-gke, and monitoring option on cluster is set to System and workload logging and monitoring

rhodgkins commented 3 years ago

I had a similar problem and found it just went away about an hour after I setup for workload identity (https://github.com/GoogleCloudPlatform/k8s-stackdriver/tree/master/custom-metrics-stackdriver-adapter), I don't know if its a case of the adapter just needing to cycle the pods or something. Bit late for you now, but might be useful for others in the future!