Closed matthewmichihara closed 3 years ago
@sharifelgamal
The only way I can see this happening is if the addon itself can't find the GCP Project at runtime. It will fail silently and those env vars won't get set.
If you are sure the project is set (either via env var or via gcloud config set project
) then try running minikube addons enable gcp-auth --refresh
, which will be available in minikube 1.20. That was teardown and create your pods with the correct config.
This came up while investigating https://stackoverflow.com/questions/67083909/project-env-vars-like-gcp-project-cloudsdk-core-project-are-no-longer-set-whe?noredirect=1#comment118606601_67083909
The user is using Cloud Code for IntelliJ's Cloud Run local development feature, which internally uses minikube to run the Cloud Run app locally. Sometimes it has been noticed that the GCP project environment variables don't get set, despite the gcp-auth addon being successfully enabled.
Environment variables that sometimes don't get set:
PROJECT_ID
GCP_PROJECT
GCLOUD_PROJECT
GOOGLE_CLOUD_PROJECT
CLOUDSDK_CORE_PROJECT
Once in this state, the environment variables seem to never get set. Running
minikube delete --all --purge
seems to fix the issue though.Optional: Full output of
minikube logs
command: