0
0
GCPcloud~30 mins

Revision management in GCP - Mini Project: Build & Apply

Choose your learning style9 modes available
Revision Management with Google Cloud Run
📖 Scenario: You are managing a web application deployed on Google Cloud Run. You want to keep track of different versions (revisions) of your service so you can control traffic and roll back if needed.
🎯 Goal: Build a simple Google Cloud Run service configuration that creates a service with multiple revisions and manages traffic splitting between them.
📋 What You'll Learn
Create a Cloud Run service configuration with a specific service name
Define two revisions with different container images
Set traffic split between the two revisions
Ensure the configuration is valid and deployable
💡 Why This Matters
🌍 Real World
Managing revisions in Cloud Run helps deploy new versions safely and control traffic during updates.
💼 Career
Cloud engineers and DevOps professionals use revision management to maintain application availability and perform smooth rollouts.
Progress0 / 4 steps
1
Create initial Cloud Run service configuration
Create a YAML configuration file named service.yaml with a service named my-cloud-run-service and specify the API version serving.knative.dev/v1 and kind Service.
GCP
Need a hint?

Start by defining the service metadata and the first revision container image.

2
Add a second revision with a new container image
Add a second revision by defining a new template under spec with the container image gcr.io/my-project/my-app:v2 and name it revision-v2 under metadata.
GCP
Need a hint?

Define the second revision template with its own metadata name and container image.

3
Configure traffic splitting between revisions
Add a traffic section under spec to split traffic 70% to the first revision named my-cloud-run-service-00001 and 30% to the second revision named revision-v2.
GCP
Need a hint?

Use the traffic field to assign percentages to each revision.

4
Complete the Cloud Run service configuration
Ensure the YAML file ends with the correct indentation and includes the containers section under the second revision template with the image gcr.io/my-project/my-app:v2.
GCP
Need a hint?

Double-check the indentation and container image under the second revision template.