Soru

Zorluk: Çok zorConfigure Azure Container Instances (ACI)

An administrator is deploying a multi-container group to Azure Container Instances (ACI) using an Azure Resource Manager (ARM) template. The group contains an application container that runs a continuous processing service and a sidecar container that collects and processes local logs. The deployment must meet the following requirements:

- The container group must reside within an existing Azure Virtual Network (VNet) inside a dedicated subnet.
- The application container must write logs to a shared directory that the sidecar container can access.
- Both containers must be restarted automatically if the application container fails.

Which of the following configurations must be defined in the template to successfully deploy this container group? (Select TWO)

  1. Delegate the VNet subnet to Microsoft.ContainerInstance/containerGroups and ensure that no public IP addresses or DNS name labels are configured for the container group.Cevap
  2. Define an emptyDir volume in the container group properties, and define volume mounts referencing this volume in both container definitions.Cevap
  3. C
    Set the restartPolicy property to Always inside each container's definition block to ensure that both containers restart individually upon failure.
  4. D
    Assign distinct private IP addresses to each container within the network profile to enable port-based communication over the delegated subnet.

Cevap

Delegate the subnet to Microsoft.ContainerInstance/containerGroups with no public IP allocation, and define a shared emptyDir volume mounted to both containers.
Integrating Azure Container Instances with a VNet requires delegating the subnet to Microsoft.ContainerInstance/containerGroups and omitting public IP or DNS name label configurations. Sharing local directories within a container group requires defining an emptyDir volume and mapping it in the volumeMounts of both containers.

Adım Adım Çözüm

1
Determine virtual network integration prerequisites.
The subnet must be delegated to Microsoft.ContainerInstance/containerGroups and public IP/DNS label properties must be omitted from the container group properties.
Subnet delegation is required for ACI VNet injection, and public endpoints are not supported within a VNet.
2
Configure the shared directory volume.
Create an emptyDir volume in the container group template resource and add corresponding volumeMounts to the application and sidecar container properties.
An emptyDir volume provides a shared, local, ephemeral directory visible to all containers in the same container group.
3
Verify restart policy configuration hierarchy.
Configure restartPolicy at the group level, and avoid setting it at the individual container configuration level.
ACI does not support setting distinct restart policies per container; the restart policy applies to the entire group resource.
4
Determine the correct network configuration inside the container group.
Ensure containers communicate over localhost using distinct ports, as they share the same network namespace and IP address.
Separate IP addresses cannot be assigned to containers within a single container group.

Anahtar Kavram

Azure Container Instances container group configurations including virtual network integration, shared volumes, network namespaces, and group-level restart policies.
Bu soruyu puanla