AZ-104Chapter 108 of 168Objective 3.3

Azure Container Apps vs AKS vs ACI

This chapter covers the three main container compute options in Azure: Azure Container Instances (ACI), Azure Kubernetes Service (AKS), and Azure Container Apps (ACA). Understanding when to use each is critical for the AZ-104 exam, as approximately 10-15% of questions touch on container compute choices, especially in scenario-based questions. You will learn the internal mechanics, key differences, and exam traps for each service, enabling you to select the right option for any given requirement.

25 min read
Intermediate
Updated May 31, 2026

Container Orchestration: Food Trucks, Catering, and Kitchens

Imagine you need to serve meals at a large event. Azure Container Instances (ACI) is like a food truck — you pull up, cook a single meal order, serve it, and drive away. It's simple, fast, and you pay only for the time you're serving. But if you have a complex menu with hundreds of orders, you need a full kitchen. Azure Kubernetes Service (AKS) is that kitchen — a professional setup with multiple stations (nodes), a head chef (control plane) who assigns tasks, and a system to handle scaling, load balancing, and failures. It's powerful but requires a skilled team to manage. Azure Container Apps (ACA) sits in between — like a catering service. You provide the recipes (container images) and specify how many servings you need, but the catering company handles the kitchen, staff, and logistics. You don't worry about the underlying infrastructure; you just define the scaling rules and ingress. ACA abstracts away the orchestration complexity while giving you more control than ACI. Each option trades off control versus simplicity: ACI is for quick, single-container tasks; ACA is for microservices with built-in scaling and networking; AKS is for full control over a Kubernetes cluster.

How It Actually Works

What Are Azure Container Services and Why Do They Exist?

Containers provide lightweight, portable application packaging. Azure offers three services to run containers, each at a different level of abstraction and control: ACI, AKS, and ACA. The exam tests your ability to choose the right service based on requirements like orchestration needs, scaling, networking, and operational overhead.

ACI is the simplest way to run a container in Azure without managing virtual machines or orchestration. It is a PaaS offering that launches a container directly on Azure infrastructure. Under the hood, ACI uses a hypervisor-level isolation technology called "Hyper-V containers" to ensure each container instance runs in its own security boundary. You can launch a container with a single command:

az container create --resource-group myRG --name mycontainer --image mcr.microsoft.com/azuredocs/aci-helloworld --dns-name-label mycontainer --ports 80

ACI supports both Linux and Windows containers. Key attributes: - Pricing: Per-second billing while the container is running. - Scaling: Manual scaling only — you cannot auto-scale. You can create multiple container groups, but not automatically. - Networking: Each container gets a public IP address and FQDN. You can also deploy into a virtual network (VNet) for private communication. - Storage: Supports Azure Files mounts for persistent storage. - Limits: Single container group can have up to 60 containers on Linux, 4 on Windows. CPU and memory limits per container group: up to 4 vCPUs and 16 GB memory (Linux) or 4 vCPUs and 16 GB (Windows). - Use cases: Simple batch jobs, build tasks, small web apps, or testing.

ACI is not suitable for multi-container microservices that need service discovery, load balancing, or auto-scaling.

AKS is a managed Kubernetes service. Kubernetes is an open-source container orchestration platform that automates deployment, scaling, and management of containerized applications. AKS simplifies cluster creation and management by providing a managed control plane (the Kubernetes master components) for free — you only pay for the worker nodes (VMs).

Under the hood, AKS provisions a control plane (API server, etcd, scheduler, controller manager) in a Microsoft-managed subscription, and worker nodes in your subscription. You define desired state in YAML manifests (Deployments, Services, Ingress, etc.). The Kubernetes scheduler places pods onto nodes based on resource requests and constraints.

Key features: - Auto-scaling: Cluster autoscaler adds/removes nodes; Horizontal Pod Autoscaler (HPA) scales pods based on CPU/memory or custom metrics. - Networking: Supports Azure CNI (advanced networking) where each pod gets an IP from the VNet, or kubenet (basic) with private IPs and NAT. Azure Load Balancer integrates natively for external traffic. - Storage: Persistent volumes via Azure Disk or Azure Files with StorageClass definitions. - Security: Azure AD integration, RBAC, network policies via Calico or Azure Network Policy, and Azure Policy for Kubernetes. - Upgrades: Managed Kubernetes version upgrades for control plane and node pools. - Monitoring: Azure Monitor for containers, Container Insights.

Typical AKS cluster creation:

az aks create --resource-group myRG --name myAKSCluster --node-count 3 --enable-addons monitoring --generate-ssh-keys

AKS is the right choice when you need full control over orchestration, custom networking policies, or complex multi-container applications. However, it requires Kubernetes expertise to manage.

Azure Container Apps (ACA)

Azure Container Apps is a serverless container platform that abstracts Kubernetes complexities. It runs on top of a hidden AKS cluster, but you never interact with Kubernetes directly. Instead, you define container apps, revisions, ingress, and scaling rules via ARM templates, Bicep, or the Azure CLI.

Under the hood, ACA uses the open-source Dapr (Distributed Application Runtime) and KEDA (Kubernetes Event-Driven Autoscaling). Dapr provides building blocks for microservices: service-to-service invocation, state management, pub/sub, and bindings. KEDA enables event-driven scaling based on queue length, HTTP traffic, cron schedules, etc.

Key attributes: - Scaling: Automatic scaling to zero when idle. You define scaling rules (e.g., based on HTTP concurrency, Azure Service Bus queue length, or custom KEDA scalers). - Networking: Each container app gets a fully qualified domain name (FQDN) with managed TLS termination. You can enable ingress with external or internal traffic. VNet integration is supported for private networking. - Revisions: Supports multiple revisions of a container app for blue-green deployments and traffic splitting. - Environment: Container apps run in a Container Apps Environment, which is a secure boundary around a set of apps. The environment is backed by a virtual network. - Limits: Maximum 30 apps per environment. Each app can have up to 4 GB memory and 4 vCPUs. Minimum 0.25 vCPU and 0.5 GB memory. - Pricing: Consumption plan (pay per second of compute, plus fixed cost per environment) or dedicated plan (reserved instances).

Example creation:

az containerapp create --resource-group myRG --name myapp --environment myenv --image myregistry.azurecr.io/myapp:v1 --target-port 80 --ingress external

ACA is ideal for microservices that need built-in scaling, Dapr capabilities, and simpler management than AKS. It is not suitable for workloads requiring direct Kubernetes API access or custom node configurations.

How to Choose

The AZ-104 exam will present scenarios with constraints like: - "You need to run a container that processes a batch job and then stops." → ACI. - "You need a fully managed Kubernetes cluster with granular control over networking policies." → AKS. - "You need a serverless platform for microservices with automatic scaling and Dapr integration." → ACA. - "You need to run a containerized app that scales to zero when not in use." → ACA (or ACI if you stop manually, but ACA does it automatically). - "You need to use Kubernetes-native tools like Helm or Istio." → AKS.

Interaction with Related Technologies

All three services integrate with Azure Container Registry (ACR) for storing container images. AKS and ACA can use managed identities for authentication to ACR without secrets. ACI can pull from ACR using image registry credentials.

For monitoring, AKS uses Container Insights (part of Azure Monitor), while ACA has built-in monitoring with Log Analytics. ACI provides basic logs via az container logs.

Networking: ACI supports VNet integration but is limited; AKS offers full control with Azure CNI; ACA provides managed ingress with automatic TLS and supports VNet integration via the environment.

Exam Critical Defaults and Values

ACI: Max 4 vCPU, 16 GB memory per container group.

AKS: Free control plane; node sizes from Standard_DS2_v2 (2 vCPU, 7 GB) upward; default node count 3.

ACA: Max 4 vCPU, 4 GB memory per container app; scaling to zero; minimum 0.25 vCPU.

Billing: ACI per-second billing; AKS per-node per-hour; ACA consumption plan per-second plus environment hourly fee.

Common Exam Trap

Candidates often confuse "serverless" with "no scaling limits." ACA scales to zero, but has resource limits per app. AKS can scale to zero nodes using virtual nodes (ACI), but that's a separate feature. ACI does not auto-scale — you must manually create instances.

Walk-Through

1

Deploy a container to ACI

Use the Azure CLI to create a container group with a single container. The command `az container create` specifies the resource group, container name, image, DNS label, and ports. Azure allocates a public IP and FQDN. The container group runs on a hypervisor-isolated VM managed by Azure. Billing starts immediately and continues until the container stops. You can monitor logs with `az container logs`. To stop, use `az container stop`; to delete, use `az container delete`.

2

Create an AKS cluster

Run `az aks create` with parameters for resource group, cluster name, node count, and optional add-ons like monitoring. Azure provisions a control plane in a managed resource group (MC_*) and creates worker nodes as VMs in your subscription. The command also configures kubeconfig for `kubectl` access. The control plane includes API server, etcd, scheduler, and controller manager. Nodes run a specialized OS image (e.g., Ubuntu 18.04 with containerd).

3

Deploy an app to AKS using YAML

Create a Deployment YAML (e.g., `deployment.yaml`) with container image, replicas, resource requests, and ports. Apply it with `kubectl apply -f deployment.yaml`. The Kubernetes scheduler assigns pods to nodes based on resource availability. Each pod gets an IP (from Azure CNI or kubenet). A Service (e.g., LoadBalancer) exposes the app externally with an Azure Load Balancer. Use `kubectl get svc` to get the external IP.

4

Set up a Container Apps environment

First, create a Container Apps Environment with `az containerapp env create`. This provisions a VNet-backed environment. Then create a container app with `az containerapp create`, specifying the image, ingress type (external or internal), target port, and scaling rules. The app gets a managed FQDN. ACA automatically configures TLS termination. You can define multiple revisions and split traffic between them.

5

Configure scaling in ACA

Define scaling rules in the container app configuration. For HTTP scaling, set `maxReplicas` and `concurrentRequests`. For event-driven scaling, use KEDA scalers (e.g., Azure Service Bus, RabbitMQ). ACA monitors the metrics and adjusts replica count automatically, scaling to zero when idle. The scale rule syntax is defined in ARM/Bicep or via CLI using `--scale-rule-*` parameters. Example: `az containerapp update --name myapp --scale-rule-name http --scale-rule-type http --scale-rule-http-concurrency 10`.

What This Looks Like on the Job

Enterprise Scenario 1: Batch Processing with ACI

A financial services company needs to process end-of-day risk calculations for thousands of portfolios. Each portfolio is independent and can be processed in a container. They choose ACI because the workload is batch-oriented and runs for 30 minutes each night. They deploy 200 container groups using an Azure DevOps pipeline, each pulling a custom image from ACR. They use Azure Files to share output data. The key consideration is cost: ACI's per-second billing is ideal since containers run only for the calculation duration. They set up a logic app to trigger the containers and collect results. A common misconfiguration is not cleaning up containers after completion, leading to unnecessary costs. They implement a retry logic for failed containers using Azure Functions.

Enterprise Scenario 2: Microservices with ACA

A retail company modernizes its e-commerce platform into microservices. They choose ACA because it provides built-in Dapr support for service-to-service calls and pub/sub, reducing development effort. Each microservice runs as a container app with HTTP scaling rules. They use KEDA to scale based on Azure Service Bus queue length for order processing. The platform handles Black Friday traffic spikes by scaling to hundreds of replicas automatically. They split traffic between blue-green revisions for zero-downtime deployments. The challenge is debugging Dapr configuration; they use Azure Monitor for traces. Misconfiguring scaling rules (e.g., too low concurrency threshold) can cause unnecessary scaling events, increasing costs.

Enterprise Scenario 3: Hybrid Kubernetes with AKS

A healthcare SaaS provider runs a multi-tenant application on AKS. They need fine-grained network policies to isolate tenant traffic. They use Azure CNI for pod-level VNet IPs and Calico network policies. They deploy Istio for mTLS and traffic management. The cluster has 50 nodes with 500 pods. They use Azure AD integration for RBAC and Azure Policy for compliance. The main pain point is managing node upgrades: they use multiple node pools and cordon/drain nodes during updates. A common mistake is not setting resource requests/limits, leading to noisy neighbor issues. They use Azure Cost Management to track costs per namespace.

How AZ-104 Actually Tests This

What AZ-104 Tests

This topic falls under Compute objective 3.3: "Implement containerized solutions." Exam questions typically present a scenario and ask you to choose the correct compute service. The exam also tests your understanding of scaling, networking, and management differences.

Common Wrong Answers and Why

1.

Choosing AKS for a simple single-container app — Candidates pick AKS because they think it's the "standard" container platform. But AKS adds unnecessary complexity and cost for a simple app. ACI or ACA would be simpler.

2.

Choosing ACI for a microservices app that needs auto-scaling — ACI does not auto-scale. Candidates forget this and choose ACI because it's easy. The correct answer is ACA or AKS.

3.

Choosing ACA when the requirement is "full control over Kubernetes" — ACA abstracts Kubernetes; if the question mentions kubectl, Helm, or custom node config, ACA is wrong. AKS is needed.

4.

Confusing "scaling to zero" with ACI — ACI stops when the container exits, but it does not automatically scale to zero based on load. ACA does.

Specific Numbers and Terms on the Exam

ACI limits: 4 vCPU, 16 GB memory per container group.

ACA limits: 4 vCPU, 4 GB memory per container app.

AKS node pool: minimum 1 node, default 3.

Pricing models: ACI per-second, AKS per-node per-hour, ACA consumption plan per-second + environment hourly.

Scaling: ACI manual, ACA automatic to zero, AKS HPA + cluster autoscaler.

Networking: ACI public IP or VNet; ACA managed ingress with TLS; AKS Azure CNI or kubenet.

Edge Cases

If a question says "serverless containers" it could refer to ACI or ACA. Look for additional clues like "auto-scaling" (ACA) or "simple batch" (ACI).

If the question mentions "Dapr" or "event-driven scaling", the answer is ACA.

If the question mentions "Kubernetes API" or "kubectl", the answer is AKS.

If the question mentions "pay per second" and "no scaling", it's ACI.

How to Eliminate Wrong Answers

Step 1: Identify if orchestration is needed. If no orchestration (single container, simple), eliminate AKS and consider ACI or ACA.

Step 2: Check for scaling requirements. If auto-scaling is needed, eliminate ACI. If scaling to zero is needed, prefer ACA over AKS (though AKS can scale to zero with virtual nodes, it's more complex).

Step 3: Check for control requirements. If full Kubernetes control is needed, choose AKS. If managed environment is acceptable, choose ACA.

Step 4: Check for Dapr, service mesh, or custom networking policies — these point to AKS or ACA (Dapr built-in).

Key Takeaways

ACI is for simple, single-container scenarios that do not require auto-scaling or orchestration.

ACA is for microservices that need auto-scaling, Dapr, and revision management without managing Kubernetes.

AKS is for full Kubernetes control, custom networking, and complex orchestration needs.

ACI and ACA support per-second billing; AKS charges per node per hour.

ACA scales to zero automatically; ACI stops when the container exits; AKS can scale to zero nodes with virtual nodes.

ACA does not support Windows containers; ACI and AKS support both Linux and Windows.

For exam scenarios, identify orchestration need, scaling requirement, and control level to choose the right service.

Easy to Mix Up

These come up on the exam all the time. Here's how to tell them apart.

ACI

Simplest: no orchestration, no cluster management.

Per-second billing.

Manual scaling only.

Max 4 vCPU, 16 GB memory per container group.

Public IP or VNet integration.

AKS

Full Kubernetes orchestration with control plane managed.

Pay per node per hour (control plane free).

Auto-scaling via HPA and cluster autoscaler.

Scalable to hundreds of nodes; pod resource limits depend on node size.

Advanced networking with Azure CNI, network policies, ingress controllers.

ACI

For simple, single-container tasks or batch jobs.

No auto-scaling; scale manually.

No built-in Dapr or event-driven scaling.

Per-second billing, no environment cost.

No revision management or traffic splitting.

ACA

For microservices with built-in scaling and Dapr.

Auto-scales to zero based on HTTP or event triggers.

Built-in Dapr, KEDA, and revision management.

Consumption plan: per-second + environment hourly fee.

Supports blue-green deployments and traffic splitting.

AKS

Full control over Kubernetes API, custom resources, and operators.

Requires Kubernetes expertise to manage.

Supports Windows containers and GPU nodes.

Custom networking with Azure CNI, network policies, service mesh.

Pricing: pay for nodes (VMs) plus control plane is free.

ACA

Serverless; no cluster management.

Simpler management; no Kubernetes knowledge needed.

Linux containers only.

Managed ingress with TLS; VNet integration via environment.

Pricing: consumption (per-second + environment) or dedicated plan.

Watch Out for These

Mistake

ACI supports auto-scaling.

Correct

ACI does not support auto-scaling. You must manually create or delete container groups. Auto-scaling is available in ACA (built-in) and AKS (via HPA and cluster autoscaler).

Mistake

AKS is entirely free.

Correct

The AKS control plane is free, but you pay for the worker node VMs, storage, and networking resources. AKS is not free; only the management layer is no-cost.

Mistake

ACA runs on a hidden AKS cluster, so you can use kubectl.

Correct

ACA abstracts Kubernetes; you cannot access the underlying Kubernetes API. All management is done through Azure CLI, portal, or ARM. kubectl is not available.

Mistake

ACI and ACA are the same thing.

Correct

ACI is simpler, for single containers or simple groups, with manual scaling. ACA is a serverless platform for microservices with auto-scaling, Dapr, and revision management. They are different services.

Mistake

You can run Windows containers on ACA.

Correct

ACA currently supports only Linux containers. ACI and AKS support both Linux and Windows containers.

Do You Actually Know This?

Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.

Frequently Asked Questions

What is the difference between ACI and ACA?

ACI (Azure Container Instances) is a simple service to run a single container or a small group of containers. It does not support auto-scaling; you must manually create instances. ACA (Azure Container Apps) is a serverless platform that runs on top of a managed Kubernetes cluster, providing auto-scaling (including scaling to zero), Dapr integration, revision management, and traffic splitting. Use ACI for batch jobs or simple apps, and ACA for microservices that need scaling and advanced features.

Can I use kubectl with Azure Container Apps?

No. Azure Container Apps abstracts the underlying Kubernetes cluster. You cannot access the Kubernetes API directly. All management is done through Azure CLI, portal, or ARM templates. If you need kubectl access, use AKS.

Which Azure container service is cheapest?

Cost depends on workload. For short-lived batch jobs, ACI is cheapest due to per-second billing and no infrastructure management. For long-running microservices, ACA consumption plan can be cost-effective if you scale to zero during idle. AKS is typically more expensive because you pay for VMs even when not fully utilized, but it offers more control. Always compare based on your specific usage pattern.

Does ACI support Windows containers?

Yes, ACI supports both Linux and Windows containers. However, Windows containers have limitations: only up to 4 containers per container group, and certain image sizes may be restricted. ACA supports only Linux containers. AKS supports both.

Can I run multiple containers in ACI?

Yes, you can run up to 60 containers (Linux) or 4 containers (Windows) in a single container group. They share the same lifecycle, network, and storage. This is useful for sidecar patterns.

What is Dapr and how does it relate to ACA?

Dapr (Distributed Application Runtime) provides building blocks for microservices, such as service invocation, state management, pub/sub, and bindings. ACA has built-in Dapr integration, so you can enable Dapr APIs per container app without managing the runtime yourself. This simplifies microservices development.

Can I use Azure Container Registry with all three services?

Yes, ACI, AKS, and ACA all support pulling images from Azure Container Registry. For ACI, you need to provide registry credentials or use managed identity. For AKS and ACA, you can use managed identities to authenticate to ACR without secrets.

Terms Worth Knowing

Ready to put this to the test?

You've just covered Azure Container Apps vs AKS vs ACI — now see how well it sticks with free AZ-104 practice questions. Full explanations included, no account needed.

Done with this chapter?