Open parth-pandit opened 3 years ago
You can populate the necessary metadata by running:
gcloud compute project-info --project PROJECT add-metadata --metadata google-compute-default-region=REGION
... where PROJECT
is your project name and REGION
is the region of your cluster.
Possibly this needs to be added to the Provisioning Compute Resources page or maybe the Prerequisites page.
I used this command to get the region:
curl -s -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/zone | cut -d/ -f 4 | sed 's/.\{2\}$//'
Below code does not pull the value of the default region.
REGION=$(curl -s -H "Metadata-Flavor: Google" \ http://metadata.google.internal/computeMetadata/v1/project/attributes/google-compute-default-region)
This is on Bootstrapping the Kubernetes Control Plane page.