You plan to deploy a containerized application to Azure Container Instances (ACI). The application consists of a single container that processes incoming image files from an Azure storage account and then terminates. If the processing fails, the container must attempt to restart. If it succeeds, the container must not run again. The ACI deployment must be integrated into an Azure Virtual Network named VNet1. Which of the following configuration options should you select? (Select TWO).
- Set the restart policy of the container group to OnFailure.Answer
- Deploy the container group into a subnet delegated to Microsoft.ContainerInstance/containerGroups.Answer
- CSet the restart policy of the container group to Always.
- DSet the restart policy of the container group to Never.
Answer
To meet the requirements, configure the container group with a restart policy of OnFailure and deploy it to a subnet delegated to Microsoft.ContainerInstance/containerGroups.
The correct configurations are setting the restart policy of the container group to OnFailure and deploying the container group into a subnet delegated to Microsoft.ContainerInstance/containerGroups. The OnFailure restart policy guarantees that the container will attempt to restart if the execution fails (non-zero exit code), but will remain stopped upon successful execution (zero exit code). Additionally, integrating ACI with a virtual network requires deploying the container group into a subnet delegated to the Microsoft.ContainerInstance/containerGroups service.
Step-by-Step Solution
Key Concept
Configuring ACI restart policies (Always, Never, OnFailure) and virtual network integration via subnet delegation.