Question

Difficulty: MediumRun Containerized Solutions using Azure Container Instances

You need to deploy a containerized API gateway to Azure Container Instances (ACI). The container must be integrated into a new subnet within an existing virtual network to access private back-end services. In which order should you perform the steps to configure and deploy the container group?

  1. 1Create a new subnet in the existing virtual network.
  2. 2Delegate the subnet to the Microsoft.ContainerInstance/containerGroups service.
  3. 3Retrieve the resource ID of the delegated subnet.
  4. 4Run the az container create command, specifying the subnet resource ID.

Answer

The correct sequence is: Create a new subnet in the existing virtual network, delegate the subnet to the Microsoft.ContainerInstance/containerGroups service, retrieve the resource ID of the delegated subnet, and run the az container create command specifying the subnet resource ID.
To integrate an Azure Container Instances container group with a virtual network, you must first create a subnet, delegate that subnet to the Microsoft.ContainerInstance/containerGroups provider, retrieve the subnet's resource ID, and then issue the deployment command with the subnet ID referenced.

Step-by-Step Solution

1
Create a new subnet in the existing virtual network.
A subnet is successfully provisioned within the virtual network.
The network path must exist before any service-specific delegation or resource deployment can occur.
2
Delegate the subnet to the Microsoft.ContainerInstance/containerGroups service.
The subnet is delegated to the container instances service.
Subnet delegation permits Azure Container Instances to create the network profiles required to run inside the virtual network.
3
Retrieve the resource ID of the delegated subnet.
The resource ID of the subnet is obtained (e.g., via az network vnet subnet show).
The deployment command needs the precise resource identifier of the delegated subnet to position the container group correctly.
4
Run the az container create command specifying the subnet resource ID.
The ACI container group is created and integrated into the virtual network.
This initiates the container group deployment inside the configured subnet.

Key Concept

Integrating Azure Container Instances (ACI) into a virtual network via subnet delegation
Rate this question