4

Have a cluster setup with the following permissions.

enter image description here

I tried creating a node pool with new permissions, which seems to be able to enable some things. I didn't find the scope required for stackdriver trace permissions in the documentation located here.

Further, trying to enable monitoring via creating a node pool, and deleting the old one didn't seem to successfully flip the switch.

gcloud container node-pools create pool-2 \
  --cluster=cluster-1 \
  --scopes=compute-rw,storage-rw,taskqueue,logging-write,monitoring-write,datastore,service-control,service-management 
jimmiebtlr
  • 141
  • 1
  • 4
  • I'm not sure what the correct answer here was, I ended up passing keys to each service via env variables. Imagine the answer may have changed since this point as well. – jimmiebtlr Jun 16 '18 at 21:22

4 Answers4

3

To add to the previous response, it is possible to enable Stackdriver Monitoring by running the previously referenced gcloud alpha container clusters update --monitoring-service=monitoring.googleapis.com command as instructed in the Container Engine metrics troubleshooting steps. More information on this command can be found on its Cloud SDK Reference page.

However, it is currently not possible to modify the Stackdriver Trace permission for an existing Container Engine instance due to the URI scope being configured at the moment of the cluster’s creation. See the Google Container Engine for Node.js Stackdriver Trace module documentation for more details.

Alternatively, if you can port your application on a new Google Container instance, you can always recreate a new cluster and enable the desired Stackdriver services/permissions on its configuration page.

Alex
  • 331
  • 2
  • 6
1

try to enable it this way:

gcloud alpha container clusters update --monitoring-service=monitoring.googleapis.com cluster-1
Evaldas
  • 11
  • 1
0

At least for Google Compute, you can use the gcloud alpha compute which offers the trace-append scope.

I suppose using the alpha for Container also allow this. Try gcloud alpha container clusters create --help to see allowed scopes

Alex F
  • 819
  • 1
  • 10
  • 17
-1

A bit late, but the solution is to just stop the VMs, go to each one of them, click edit, go to the bottom and change the permissions :)

PS My solution is for Dataproc cluster but think that it will be similar for kubernetes