Containers on Azure: Container Registry, Container Instances, Container Apps and Introduction to AKS
Container Basics
- A container packages an app with its libraries so it runs the same everywhere
- An image is the template. A registry stores images
- Containers share the host OS kernel, so they start fast and use less memory than VMs
Azure Container Registry (ACR)
bash
az acr create -g rg-cont -n acrdemo482 --sku Basic
az acr build -r acrdemo482 -t webapp:v1 . # builds in the cloud from a Dockerfile
az acr repository list -n acrdemo482 -o table
az acr login -n acrdemo482
- SKUs: Basic, Standard, Premium (geo-replication, private link, content trust)
- Prefer managed identity or Entra tokens. Avoid the admin user in production
Azure Container Instances (ACI)
bash
az container create -g rg-cont -n aci-hello --image mcr.microsoft.com/azuredocs/aci-helloworld --cpu 1 --memory 1 \
--dns-name-label hello482 --ports 80
az container show -g rg-cont -n aci-hello --query "{fqdn:ipAddress.fqdn, state:instanceView.state}"
az container logs -g rg-cont -n aci-hello
az container delete -g rg-cont -n aci-hello --yes
- Fast, per-second billing, no cluster to manage
- Good for simple apps, batch jobs, build agents and testing
- Supports container groups (several containers sharing a network)
Azure Container Apps
- Serverless platform for microservices and APIs, built on Kubernetes but with no cluster to manage
- Scale to zero and event-based scaling (KEDA), revisions for traffic splitting, Dapr support
bash
az containerapp env create -g rg-cont -n env-demo -l centralindia
az containerapp create -g rg-cont -n app-demo --environment env-demo --image mcr.microsoft.com/k8se/quickstart:latest \
--target-port 80 --ingress external --min-replicas 0 --max-replicas 5
Azure Kubernetes Service (AKS) Basics
| Part | Meaning |
|---|---|
| Control plane | Managed by Azure (API server, scheduler). Free or paid tier |
| Node pool | VMs that run your pods (system and user pools) |
| Pod / Deployment / Service | Kubernetes objects: run containers, keep replicas, give stable access |
| Ingress | HTTP routing into the cluster |
bash
az aks create -g rg-cont -n aks-demo --node-count 2 --node-vm-size Standard_D2s_v5 --enable-managed-identity --generate-ssh-keys --attach-acr acrdemo482
az aks get-credentials -g rg-cont -n aks-demo
kubectl get nodes
kubectl create deployment web --image=acrdemo482.azurecr.io/webapp:v1 --replicas=2
kubectl expose deployment web --type=LoadBalancer --port=80
kubectl get svc web
az aks scale -g rg-cont -n aks-demo --node-count 3
az aks stop -g rg-cont -n aks-demo # save cost in dev
--attach-acrlets AKS pull images from ACR- Use the cluster autoscaler and horizontal pod autoscaler for scale
- Upgrade clusters regularly with
az aks upgradeor auto-upgrade channels
Which One?
| Need | Choose |
|---|---|
| Run one container quickly or a batch job | ACI |
| Microservices, little ops, scale to zero | Container Apps |
| Full Kubernetes control and ecosystem | AKS |
| Web app from code or container, simple | App Service |
Practice
- Build an image with
az acr build - Run it in ACI and check logs
- Deploy it as a Container App
- Create a small AKS cluster and deploy it with kubectl (stop the cluster after practice)
Conclusion
ACR stores images. ACI runs simple containers, Container Apps runs microservices serverlessly and AKS provides full Kubernetes. Choose by control needed and operations effort.
Quick Summary: basics; ACR; ACI; Container Apps; AKS; choosing.

