Exercise - Manage revisions in Azure Container Apps
In this exercise, you deploy a new revision of your container app and configure traffic splitting between two labeled revisions.
The following Azure resources must be available in your Resource group named RG1:
- A Container registry instance that contains one image.
- A Virtual network with subnets.
- A Service Bus Namespace
- A Managed Identity
- A Private endpoint
- A Container App
- A Container Apps Environment
You've been asked to configure traffic splitting for your Container Apps to meet the following requirements:
- You need to create a new revision of the container app that uses a suffix of v2.
- You must ensure that 25 percent of requests to your app are directed to the v2 revision.
- You must label the revisions "current" and "updated" and ensure that requests to the "updated" revision are directed to the v2 revision.
You complete the following tasks during this exercise:
Set revision management to multiple.
Create a new revision with a v2 suffix.
Configure labels on the revisions.
Configure a traffic percentage on the revisions.
Verify the configuration.
Set revision management to multiple
In the Azure portal, open your container app resource.
On the left side menu, under Application, select Revisions and replicas.
At the top of the Revisions and replicas page, select Choose revision mode.
To switch from single to multi-revision mode, select Confirm.
On the Revisions and replicas page, wait for the Revision Mode setting to update.
The Revision Mode will be set to Multiple after the update. Also, on the left-side menu, the section title changes from Application to Revisions.
Create a new revision with a v2 suffix
In the Azure portal, ensure that you have the Revisions and replicas page of your container app resource open.
At the top of the page, select + Create new revision.
On the Create and deploy new revision page, complete the following steps:
- Name / suffix: Enter v2
- Under Container image, select your container image. For example, aca-az2003.
Select Create.
Wait for the deployment to be completed.
Configure labels on the revisions
On the left-side menu, under Settings, select Ingress.
If Ingress isn't enabled, select Enabled.
On the Ingress page, specify the following information:
Ingress traffic: select Accepting traffic from anywhere.
Ingress type: select HTTP.
Client certificate mode: ensure that Ignore is selected.
Transport: ensure that Auto is selected.
Insecure connections: ensure that Allowed is NOT checked.
Target port: enter 5000
IP Security Restrictions Mode: ensure that Allow all traffic is selected.
At the bottom of the Ingress page, select Save, and then wait for the update to complete.
On the left-side menu, under Revisions, select Revisions and replicas.
For the v2 revision, under Label, enter updated
For the other revision, enter current
At the top of the page, select Save.
Configure a traffic percentage on the revisions
Ensure that you have the Revisions and replicas page open.
For the v2 revision, under Traffic, enter 25 as the percentage.
For the other revision, under Traffic, enter 75 as the percentage.
At the top of the page, select Save.
Check your work
Ensure that you have your Container App open in the Azure portal.
On the left-side menu, under Application, select Revisions and replicas.
Verify that your revisions are configured as follows:
