Artifact Registry is a service in Google Cloud that stores and manages container images and language packages securely and reliably.
Click to reveal answer
beginner
Which command creates a new Artifact Registry repository in Google Cloud?
The command is: gcloud artifacts repositories create REPOSITORY_NAME --repository-format=FORMAT --location=LOCATION Replace REPOSITORY_NAME, FORMAT (like docker), and LOCATION with your values.
Click to reveal answer
intermediate
Why do you specify a location when creating an Artifact Registry repository?
The location defines where your artifacts are stored physically, which affects latency and compliance with data regulations.
Click to reveal answer
intermediate
What repository formats can Artifact Registry support?
Artifact Registry supports formats like Docker images, Maven packages, npm packages, Python packages, and more.
Click to reveal answer
intermediate
What IAM role is typically needed to create an Artifact Registry repository?
The role 'roles/artifactregistry.admin' or equivalent permissions are needed to create and manage Artifact Registry repositories.
Click to reveal answer
Which gcloud command option specifies the repository format when creating an Artifact Registry repository?
A--format-repository
B--repository-format
C--repo-format
D--format
✗ Incorrect
The correct option is --repository-format to specify the type of repository like docker or maven.
What is the default location if none is specified when creating an Artifact Registry repository?
Aglobal
Bus-east1
Cus-central1
DNo default; location is required
✗ Incorrect
You must specify a location; there is no default location for Artifact Registry repositories.
Which of these is NOT a supported repository format in Artifact Registry?
ARubyGems
Bnpm
CMaven
DDocker
✗ Incorrect
Artifact Registry does not currently support RubyGems format.
What IAM role allows a user to create Artifact Registry repositories?
Aroles/storage.objectViewer
Broles/compute.admin
Croles/artifactregistry.admin
Droles/viewer
✗ Incorrect
The roles/artifactregistry.admin role grants permissions to create and manage Artifact Registry repositories.
Which Google Cloud service is Artifact Registry replacing?
AContainer Registry
BCloud Storage
CCloud Build
DCloud Functions
✗ Incorrect
Artifact Registry is the next-generation service replacing Container Registry for storing container images.
Explain the steps to create an Artifact Registry repository in Google Cloud.
Think about the command and required options.
You got /5 concepts.
Describe why choosing the right location for an Artifact Registry repository is important.
Consider performance and legal reasons.
You got /4 concepts.
Practice
(1/5)
1. What is the main purpose of creating an Artifact Registry in Google Cloud?
easy
A. To host virtual machines
B. To securely store and manage software packages
C. To monitor network traffic
D. To create databases
Solution
Step 1: Understand Artifact Registry purpose
Artifact Registry is designed to store and manage software packages securely.
Step 2: Compare options with purpose
Options B, C, and D relate to other services like Compute Engine, VPC, and Cloud SQL, not Artifact Registry.
Final Answer:
To securely store and manage software packages -> Option B
Quick Check:
Artifact Registry = Secure package storage [OK]
Hint: Artifact Registry = package storage, not VMs or databases [OK]
Common Mistakes:
Confusing Artifact Registry with Compute Engine
Thinking it manages databases
Assuming it monitors network traffic
2. Which of the following is the correct command syntax to create an Artifact Registry repository with Docker format in region us-central1?
easy
A. gcloud artifacts repositories create my-repo --repository-format=docker --location=us-central1
B. gcloud artifacts create repository my-repo --format=docker --region=us-central1
C. gcloud create artifacts repository my-repo --format=docker --location=us-central1
D. gcloud artifacts repositories new my-repo --repository-format=docker --location=us-central1
Solution
Step 1: Recall correct gcloud command structure
The correct command is 'gcloud artifacts repositories create' followed by repository name and flags '--repository-format' and '--location'.
Step 2: Match options with correct syntax
gcloud artifacts repositories create my-repo --repository-format=docker --location=us-central1 matches the correct syntax exactly. Other options have wrong order or wrong flags.
Final Answer:
gcloud artifacts repositories create my-repo --repository-format=docker --location=us-central1 -> Option A