Azure Container Apps
Azure Container Apps runs your containers with automatic scaling and HTTPS, without you having to manage a Kubernetes cluster.
On this page · 5 min · Intermediate
On this page
- Learning objectives
- Explanation
- Code example
- Step by step
- Real-world use
- Common mistakes
- Best practices
- Remember this
- Practice exercise
- Mini quiz
- Related topics
- My notes
- Reading time
- 5 min
- Difficulty
- Intermediate
- Updated
- Oct 29, 2026
Related tutorials
Learning objectives#
- Deploy a container app from source or an image
- Configure ingress and scaling
- Use revisions for safe releases
- Pass configuration and secrets
Explanation#
Container apps live in an environment, which provides shared networking and logging. Under the hood it runs on Kubernetes, but you never touch the cluster.
Ingress makes an app reachable over HTTPS; set it to external for public APIs or internal for services called only by other apps.
Scaling rules (HTTP traffic, queue length, CPU and more) scale replicas up and down — including to zero.
Each deployment can create a revision. You can split traffic between revisions for blue-green or canary releases.
Code example: Deploy an API from source#
az containerapp up --name ca-shop-api --resource-group rg-shop-dev \
--location centralindia --source . \
--ingress external --target-port 8080 \
--env-vars ASPNETCORE_ENVIRONMENT=Development
az containerapp update -n ca-shop-api -g rg-shop-dev --min-replicas 0 --max-replicas 5
az containerapp show -n ca-shop-api -g rg-shop-dev --query properties.configuration.ingress.fqdn -o tsv
ca-shop-api.<random>.centralindia.azurecontainerapps.io — the API is live over HTTPS and scales between 0 and 5 replicas.
This example is illustrative. Copy or download it and run it in your own environment; the expected output is shown above.
Step-by-step explanation#
- containerapp up builds the image from your Dockerfile, pushes it to a registry and deploys it.
- External ingress gives a public HTTPS URL; target port is the port your container listens on.
- min-replicas 0 allows scale to zero when idle.
- The fqdn is the app’s public address.
Real-world use case#
Microservices and APIs that need containers but not the complexity of AKS: an orders API, a background worker scaling on queue length, a scheduled job.
Common mistakes#
If the container listens on 8080 but ingress targets 80, health checks fail. .NET 8+ images listen on 8080 by default.
Store sensitive values as container app secrets or Key Vault references.
Best practices#
- Use managed identity to pull images and read secrets
- Use revisions and traffic splitting for releases
- Scale on the signal that matters (HTTP, queue length)
- Send logs to Log Analytics
Remember this#
Containers without managing Kubernetes.
Ingress external = public URL. Target port = what your container listens on.
Revisions + traffic split = safe releases.
Practice exercise#
Your task: Send 20% of traffic to the latest revision and 80% to the previous one.
Show solution
az containerapp revision set-mode -n ca-shop-api -g rg-shop-dev --mode multiple
az containerapp ingress traffic set -n ca-shop-api -g rg-shop-dev --revision-weight latest=20 <previous-revision-name>=80
Mini quiz#
Can Azure Container Apps scale to zero replicas?
Want more? Practise all Microsoft Azure MCQs · Microsoft Azure interview questions
My notes#
Saved in this browser.