Events
17 Mar, 9 pm - 21 Mar, 10 am
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The Azure Container Apps service enables you to run microservices and containerized applications on a serverless platform. With Container Apps, you enjoy the benefits of running containers while you leave behind the concerns of manually configuring cloud infrastructure and complex container orchestrators.
In this quickstart, you create and deploy your first container app using the az containerapp up
command.
To sign in to Azure from the CLI, run the following command and follow the prompts to complete the authentication process.
az login
To ensure you're running the latest version of the CLI, run the upgrade command.
az upgrade
Next, install or update the Azure Container Apps extension for the CLI.
If you receive errors about missing parameters when you run az containerapp
commands in Azure CLI or cmdlets from the Az.App
module in PowerShell, be sure you have the latest version of the Azure Container Apps extension installed.
az extension add --name containerapp --upgrade
Note
Starting in May 2024, Azure CLI extensions no longer enable preview features by default. To access Container Apps preview features, install the Container Apps extension with --allow-preview true
.
az extension add --name containerapp --upgrade --allow-preview true
Now that the current extension or module is installed, register the Microsoft.App
and Microsoft.OperationalInsights
namespaces.
az provider register --namespace Microsoft.App
az provider register --namespace Microsoft.OperationalInsights
Create and deploy your first container app with the containerapp up
command. This command will:
Note that if any of these resources already exist, the command will use them instead of creating new ones.
az containerapp up \
--name my-container-app \
--resource-group my-container-apps \
--location centralus \
--environment 'my-container-apps' \
--image mcr.microsoft.com/k8se/quickstart:latest \
--target-port 80 \
--ingress external \
--query properties.configuration.ingress.fqdn
Note
Make sure the value for the --image
parameter is in lower case.
By setting --ingress
to external
, you make the container app available to public requests.
The up
command returns the fully qualified domain name for the container app. Copy this location to a web browser.
The following message is displayed when the container app is deployed:
If you're not going to continue to use this application, run the following command to delete the resource group along with all the resources created in this quickstart.
Caution
The following command deletes the specified resource group and all resources contained within it. If resources outside the scope of this quickstart exist in the specified resource group, they will also be deleted.
az group delete --name my-container-apps
Tip
Having issues? Let us know on GitHub by opening an issue in the Azure Container Apps repo.
Events
17 Mar, 9 pm - 21 Mar, 10 am
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowTraining
Module
Implement Azure Container Apps - Training
Run serverless containerized apps in Azure Container Apps service.
Certification
Microsoft Certified: Azure Developer Associate - Certifications
Build end-to-end solutions in Microsoft Azure to create Azure Functions, implement and manage web apps, develop solutions utilizing Azure storage, and more.