Question

Difficulty: EasyDeploy and Configure Azure Container Apps

A developer needs to deploy a containerized API to Azure Container Apps using the Azure CLI. The container image is stored in a public registry. Which sequence of Azure CLI commands must the developer execute to successfully deploy the application?

  1. 1Run `az group create` to provision a resource group.
  2. 2Run `az containerapp env create` to provision the environment.
  3. 3Run `az containerapp create` to deploy the application container.

Answer

The developer must first create an Azure Resource Group, then create a Container Apps environment, and finally deploy the Container App inside the environment.
The correct order follows the logical resource hierarchy in Azure: the resource group acts as the top-level container, the Container Apps environment is provisioned inside it, and the Container App itself is deployed within that environment.

Step-by-Step Solution

1
Run `az group create` to establish a resource group.
A resource group is provisioned to contain all other services.
All Azure resources must reside in a resource group, which manages their lifecycle and metadata.
2
Run `az containerapp env create` to provision the environment.
A Container Apps environment is created inside the resource group.
The environment functions as a secure network boundary and configuration holder for one or more Container Apps.
3
Run `az containerapp create` to deploy the container.
The Container App is running in the environment.
The Container App requires both a resource group and a Container Apps environment parameter to be created successfully.

Key Concept

Deploying Azure Container Apps requires provisioning a Resource Group and a Container Apps Environment before deploying the container app resource itself.
Estimated Time:1m 0s
Rate this question