Overview and What You Will Learn
In this lab, you will deploy the same simple container two ways - once on Azure Container Instances in under a minute, and once conceptually on AKS - so the operational overhead difference between "run one container" and "orchestrate many containers" becomes concrete rather than abstract.
Why This Matters in Production
A team at a growing startup needs to run one simple, short-lived data processing container once a day. They deploy an entire AKS cluster for it, and now someone on the team has to manage cluster upgrades, node patching, and Kubernetes version compatibility for a workload that never needed any of that complexity in the first place. Azure Container Instances would have run the exact same container with none of that ongoing operational burden.
Core Principles
ACI and AKS solve genuinely different problems, and the right choice depends entirely on how many containers you're running and whether they need to coordinate with each other.
+------------------------------------------+| Azure Container Instances (ACI) || Run a single container quickly || No cluster, no orchestration layer || Best for: one-off tasks, simple services |+------------------------------------------+| Azure Kubernetes Service (AKS) || Manage many coordinated containers || Automated scaling, self-healing, rolling || updates across a distributed set of services|| Best for: genuine multi-service orchestration|+------------------------------------------+The deciding question is not "do I have containers" - it is "do I have multiple interdependent containerized services that genuinely need coordinated scaling, service discovery, and self-healing." If the honest answer is no, ACI is very likely the correct, lower-overhead choice.
Detailed Step-by-Step Practical Lab
- Create a Resource Group:
az group create --name rg-aci-lab-mumbai --location centralindia- Deploy a single container directly on ACI, with no cluster to create first:
az container create \ --resource-group rg-aci-lab-mumbai \ --name daily-report-job \ --image mcr.microsoft.com/azuredocs/aci-helloworld \ --cpu 1 \ --memory 1 \ --ports 80 \ --ip-address Public- Confirm the container is running and reachable within roughly a minute of the command completing:
az container show \ --resource-group rg-aci-lab-mumbai \ --name daily-report-job \ --query "instanceView.state" --output tsv az container show \ --resource-group rg-aci-lab-mumbai \ --name daily-report-job \ --query "ipAddress.ip" --output tsvNoteNotice there was no cluster to provision, no node pool to size, and no Kubernetes version to choose - ACI's entire value proposition is exactly this reduced setup, appropriate when you genuinely only need to run one container.
- Check the logs from the running container directly, without needing
kubectlor any cluster-level tooling:
az container logs \ --resource-group rg-aci-lab-mumbai \ --name daily-report-jobConsider the counter-scenario: if this same team needed five coordinated services - each independently scalable, needing to discover and call each other by name, with automatic recovery if any one crashes - recreating that coordination manually across separate ACI instances becomes exactly the complexity AKS exists to manage instead.
Clean up:
az group delete --name rg-aci-lab-mumbai --yes --no-waitProduction Best Practices & Common Pitfalls
Common MistakeDeploying a full AKS cluster for a single simple container "to be consistent with our other Kubernetes workloads," when that consistency is not actually a functional requirement and the added cluster management overhead delivers no real benefit for a workload this narrow.
TipACI is also a strong fit for burst compute needs - like AKS itself using "virtual nodes" backed by ACI to rapidly scale out pod capacity beyond a cluster's own provisioned nodes during a sudden spike, without needing to provision additional VMs first.
- ACI containers are billed per second while running, similar in spirit to how Lambda-style serverless compute is billed - appropriate for short-lived or intermittent workloads rather than something running continuously all day.
- AKS's operational overhead is a real, ongoing cost, not a one-time setup cost - cluster upgrades, node OS patching, and Kubernetes version compatibility all require continued attention long after initial deployment.
Quick Reference & Troubleshooting Commands
| Command | Description |
|---|---|
az container create |
Deploy a single container on ACI |
az container show |
Check an ACI container's status and IP |
az container logs |
View logs from a running ACI container |
az aks create |
Create a full AKS cluster (for comparison) |