Is there a way to inherit host environmental variables in the GKE pods?
I am specifically interested in GOOGLE_APPLICATION_CREDENTIALS - container performs some internal project services and it would be great if I could reuse Compute Engine default Service Account as opposed to define a custom one.
Where are you planning to inherit environment variables from?
By default, if you give your container cluster enough privileges (i.e. the --scopes
argument in gcloud container clusters create
), containers will be able to use GCE machine’s IAM role and will be able to use the services listed in --scopes
.
If you use --scopes
, you don't need to specify any GOOGLE_APPLICATION_CREDENTIALS
, most Google Cloud client libraries will automatically use GCE instance’s identity to make requests.