Creating and configuring a container app in Azure Container Apps involves deploying a containerized application into a fully managed, serverless environment designed for cloud-native workloads. Azure Container Apps abstracts away the need to manage Kubernetes clusters while still providing key capabilities such as autoscaling, revisions, traffic splitting, and secure integration with supporting services like Azure Container Registry.
In this process, you define the container image to run, configure environment settings such as ingress and scaling rules, and connect the app to the required resources and identities. This setup enables reliable, scalable, and efficient execution of microservices and event-driven applications without managing underlying infrastructure.
Create a container app that uses an ACR image
Open your Azure portal.
On the portal menu, select + Create a resource.
On the top search bar, in the Search textbox, enter container app
In the search results under Services, select Container Apps.
Select Create.
On the Basics tab, specify the following:
Subscription: Specify the Azure subscription that you're using.
Resource group: RG1
Container app name: aca-az2003
Region: Select the Region specified for VNET1 (Central US).
The container app needs to be in the same region/location as the virtual network so you can choose VNET1 for the managed environment. For this guided project, keep all of your resources in the region/location specified for your resource group.
Container Apps Environment: Select Create new.
- On the Create Container Apps Environment page, select the Networking tab, and then specify the following:
Use your own virtual network: Select Yes.
Virtual network: Select VNET1.
Infrastructure subnet: ACASubnet.
If the ACASubnet subnet is not listed, open your virtual network resource, adjust the subnet address range to 10.0.2.0/23 and retry the steps to create the Container App.
On the Create Container Apps Environment page, select Create.

On the Create Container App page, select the Container tab, and then specify the following:
Use quickstart image: Ensure that this setting is not selected. If it is selected, uncheck this setting.
Name: Enter aca-az2003
Image source: Ensure that Azure Container Registry is selected.
Registry: Select your container registry.: acraz2003cah.azurecr.io
Image: Select aspnetcorecontainer
Image tag: Select latest
- Select Review + create.
- Once verification has Passed, select Create.
Wait for the deployment to complete.

Configure the container app to authenticate using the user assigned identity
On the Azure portal, open the Container App that you created.
Under Security, select Identity.
Select the tab for User assigned.
Select Add user assigned managed identity.
On the Add user assigned managed identity page, select uai-az2003, and then select Add.
Configure a connection between the container app and Service Bus
On the Azure portal, ensure that you have your Container App open.
Under Settings, select Service Connector (Preview).
Select Connect to your Services.
On the Create connection page, specify the following:
Service type: Select Services Bus.
Client type: Select .NET.
- Select Next: Authentication.
On the Authentication tab, select User assigned managed identity.
Ensure that the correct subscription and user assigned managed identity are selected.
Subscription: The Azure subscription that you're using.
User assigned managed identity: uai-az2003
To change tabs, select Review + Create.

- Once the Validation passed message appears, select Create.
Wait for the connection to be created.
It can take a minute before the Service Connector page updates with the new connection.


Configure HTTP scale rules
Ensure that your Container App is open in the portal.
- On the left-side menu under Application, select Revisions and replicas.
Notice the Name assigned to your active revision.
- On the left-side menu under Application, select Containers.
To the right of Based on revision, ensure that your active revision is selected.
At the top of the page, select Edit and deploy.
At the bottom of the page, select Next: Scale.
- Configure the Min / max replicas as follows:
Set Min replicas: 0
Set Max replicas: 2
Under Scale rule, select + Add.
- On the Add scale rule page, specify the following:
Rule name: Enter scalerule-http
Type: Select HTTP scaling.
Concurrent requests: Set the value to 10,000.
- On the Add scale rule page, select Add.
On the Create and deploy new revision page, select Create.
Ensure that your new scale rule is displayed.


Verify your work
Now you have to verify that your configuration meets the specified requirements.
In the Azure portal, ensure that your Container App resource is open.
On the left-side menu, under Settings, select Deployment.
At the top of the page, ensure that the Continuous deployment tab is selected.
Verify that the expected Registry settings are reported:
Repository source: Azure Container Registry
Registry: the name of your Container Registry; acraz2003LT2025
Image: aca-az2003

- Open your Container Apps Environment resource.
Verify that your Container App uses the proper subnet as follows:
On the Overview page, verify that Virtual Network is set to VNET1.
On the Overview page, verify that Infrastructure subnet is set to ACASubnet.

Verify that the targetService properties match the specified configuration.
To verify your HTTP scale rule, you would need to run testing software that's able to simulate 10,000 concurrent HTTP requests and ensure that container replicas are created.










Top comments (0)