0
0
GCPcloud~10 mins

Cloud Run for containerized services in GCP - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to deploy a container image to Cloud Run.

GCP
gcloud run deploy my-service --image [1] --platform managed
Drag options to blanks, or click blank then click option'
Aus-central1
Bmy-service
Cdocker build
Dgcr.io/my-project/my-image:latest
Attempts:
3 left
💡 Hint
Common Mistakes
Using the service name instead of the image URL.
Using a region name where the image URL is expected.
2fill in blank
medium

Complete the code to specify the region for Cloud Run deployment.

GCP
gcloud run deploy my-service --image gcr.io/my-project/my-image:latest --platform managed --region [1]
Drag options to blanks, or click blank then click option'
Aus-central1
Bmy-service
Clatest
Ddocker
Attempts:
3 left
💡 Hint
Common Mistakes
Using the service name instead of a region.
Using a tag like 'latest' where a region is expected.
3fill in blank
hard

Fix the error in the command to allow unauthenticated access to the Cloud Run service.

GCP
gcloud run deploy my-service --image gcr.io/my-project/my-image:latest --platform managed [1]
Drag options to blanks, or click blank then click option'
A--no-allow-unauthenticated
B--allow-unauthenticated
C--public-access
D--enable-unauthenticated
Attempts:
3 left
💡 Hint
Common Mistakes
Using the negative flag --no-allow-unauthenticated which denies public access.
Using incorrect or non-existent flags.
4fill in blank
hard

Fill both blanks to set the maximum number of instances and memory limit for the Cloud Run service.

GCP
gcloud run deploy my-service --image gcr.io/my-project/my-image:latest --platform managed --max-instances [1] --memory [2]
Drag options to blanks, or click blank then click option'
A5
B512Mi
C1Gi
D10
Attempts:
3 left
💡 Hint
Common Mistakes
Using memory values without units.
Setting max instances to a string instead of a number.
5fill in blank
hard

Fill all three blanks to create a Cloud Run service with environment variables and concurrency settings.

GCP
gcloud run deploy my-service --image gcr.io/my-project/my-image:latest --platform managed --set-env-vars [1] --concurrency [2] --region [3]
Drag options to blanks, or click blank then click option'
AENV=production
B80
Cus-east1
DDEBUG=true
Attempts:
3 left
💡 Hint
Common Mistakes
Using multiple environment variables without commas.
Setting concurrency to a string instead of a number.