What should you do?

You have downloaded and installed the gcloud command line interface (CLI) and have authenticated with your Google Account. Most of your Compute Engine instances in your project run in the europe-west1-d zone. You want to avoid having to specify this zone with each CLI command when managing these instances.

What should you do?
A . Set the europe-west1-d zone as the default zone using the gcloud config subcommand.
B . In the Settings page for Compute Engine under Default location, set the zone to europeCwest1-d.
C . In the CLI installation directory, create a file called default.conf containing zone=europeCwest1Cd.
D . Create a Metadata entry on the Compute Engine page with key compute/zone and value europeCwest1Cd.

Answer: A

Explanation:

Change your default zone and region in the metadata server Note: This only applies to the default configuration. You can change the default zone and region in your metadata server by making a request to the metadata server. For example: gcloud compute project-info add-metadata –metadata google-compute-default-region=europe-west1, google-compute-default-zone=europe-west1-b The gcloud command-line tool only picks up on new default zone and region changes after you rerun the gcloud init command. After updating your default metadata, run gcloud init to reinitialize your default configuration.

https://cloud.google.com/compute/docs/gcloud-compute#change_your_default_zone_and_region_in_the_metadata_server

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments