In this lab, we’ll explore the traffic management options of Cloud Run. We’ll deploy an application, then roll out a breaking change and perform a rollback. Then, we’ll deploy a fix, with traffic splitting between our versions, before finally routing all traffic to the latest version. You should be familiar with the GCP console and Cloud Shell to perform this hands-on lab.
Successfully complete this lab by achieving the following learning objectives:
- Deploy the Application
- Use either the gcloud SDK or the GCP web console to create the Cloud Run service.
- Use the container image with the blue tag from your project’s container registry to launch the blue version of the demo application.
- Roll Back a Breaking Change
- Create a new revision of the service in Cloud Run by changing to the purple tag of the container image.
- Roll back to the previous version by routing 100% of traffic to the old revision.
Note: You can achieve the above with either the gcloud SDK or the GCP web console.
- Perform a Gradual Rollout
- Create a new revision of the service with the green tag of the container image, but deploy it without routing traffic.
- Adjust the traffic splitting: Direct 50% of traffic to the new green version and 50% to the previous blue version.