Azure Container App - Chapter 1: Deploying an Azure Container Application With CLI

Sharing

Click to Home

Log Issues

Click to Log Issue

Description:

Azure Container App is a service in Azure that provides a simplified way to deploy and manage containers on Azure. It allows you to deploy containerized applications on a fully managed infrastructure, without having to manage the underlying infrastructure.

The service provides integration with popular open-source technologies, such as Docker and Kubernetes, and includes features like auto-scaling, load balancing, and monitoring.

You can use Azure Container App to modernize legacy applications, deploy microservices, and automate the deployment of applications using continuous integration and delivery (CI/CD) pipelines.

With Azure Container App, you can take advantage of the scalability, reliability, and security of Azure, while keeping your existing skills and tools.


Guide to Creating an Azure Container Application Step-by-Step


az extension add --name containerapp --upgrade

az provider register --namespace Microsoft.App

az provider register --namespace Microsoft.OperationalInsights

az group create -n testcontainerlab -l eastus2

az containerapp env create -n managedEnvironment-testcontainerlab -g testcontainerlab --location eastus2

az containerapp create -n containerapplab2 -g testcontainerlab --environment managedEnvironment-testcontainerlab --image nginx:alpine --target-port 80 --cpu 0.5 --memory 1.0Gi --ingress external

 

The script performs the following tasks:

  1. Adds the "containerapp" extension to the Azure CLI.

  2. Registers two Azure providers: "Microsoft.App" and "Microsoft.OperationalInsights".

  3. Creates a resource group named "testcontainerlab" in the "eastus2" location.

  4. Creates a managed environment named "managedEnvironment-testcontainerlab" in the "testcontainerlab" resource group.

  5. Creates a container app named "containerapplab2" in the "testcontainerlab" resource group, using the managed environment "managedEnvironment-testcontainerlab". The container uses the "nginx:alpine" image, maps port 80 to the target port, uses 0.5 CPU and 1.0Gi of memory, and allows external ingress traffic.


Click to Home