Soru

Zorluk: KolayRun Containerized Solutions using Azure Container Instances

You need to deploy a containerized application to Azure Container Instances (ACI) using the Azure CLI and verify that it has started successfully. Arrange the steps in the correct sequence to achieve this goal.

  1. 1Run the `az group create` command to establish an Azure resource group.
  2. 2Run the `az container create` command specifying the resource group, container image, and ports.
  3. 3Run the `az container show` command to inspect the provisioning state and runtime properties.

Cevap

The correct order of steps is to first create the Azure resource group, then deploy the container instance to that resource group, and finally query the properties of the container group to verify its status.
In Azure, resources cannot exist without a parent resource group. Therefore, the resource group must be created first. Once the resource group is active, the container instance can be provisioned. Finally, the container show command is run to inspect the state and ensure it has successfully transitioned to running.

Adım Adım Çözüm

1
Execute the command to create an Azure resource group.
A resource group is provisioned in the specified region.
Azure Container Instances require an existing resource group to host the deployment.
2
Execute the command to deploy the container instance.
The ACI resource starts provisioning and pulling the specified container image.
This command creates the container group resource within the resource group prepared in the first step.
3
Execute the command to retrieve the container instance details.
The CLI outputs the JSON configuration containing the current provisioning state and IP address.
This is necessary to verify that the container state is 'Running' and to retrieve connectivity details.

Anahtar Kavram

Azure Container Instances deployment workflow via Azure CLI
Bu soruyu puanla