Gcloud service account activation on zero-to-jupyterhub

I have jupyterhub running on K8s, which has a service account json key file loaded from a K8s secret. The env var GOOGLE_APPLICATION_CREDENTIALS is set to point to the file.

I find that in order for gsutil to work properly, I have to execute the following command:

gcloud auth activate-service-account --key-file=${GOOGLE_APPLICATION_CREDENTIALS}

What is the proper config/hook to setup in order that this is done automatically for a singleuser?


Received an answer on github