I love containers; the peace they bring by abstracting away the underlying infrastructure is a massive game changer. You just package your application, define the running environment, and it just runs, anywhere!
But when it comes to running containers in Azure, the abundance of options can be overwhelming. Should you go serverless? Use AKS? Or even consider app services or event-driven containers! π§
In this blog post, Iβll provide you with some insights into all the possibilities for running containers in Azure. Weβll explore the key features, pros and cons, and when to use each, so you can choose the best fit for your project!
During this post, you might see this symbol: π, which indicates that the subsequent part explains the technical details in the context of this post.
All those options!
So, how do you run containers in Azure? Well, grab some coffee because this is going to be a ride (in a good way) π.
Whether youβre after something quick and serverless, a fully orchestrated AKS cluster, or even a hybrid setup running in your datacenter, Azure has something for you!
Butβ¦. With great power comesβ¦ well, a slightly overwhelming decision tree.
Donβt worry, itβs not as scary as it sounds, and by the end of this post, youβll be confidently picking the right home for your containers like a pro.
π Letβs summarize!
π Azure Container Instance (ACI)
Short: βPick this container image and just run it.β
Extended: This is the easiest way to get started with containers without managing any infrastructure. Perfect fit for a quick task, APIβs or background job. If you donβt need any orchestration, this would be a good fit.
Examples:
- Worker service responding to service bus messages
- Processing jobs with a scheduled interval
π Container instances support a pattern called “Container Groups”. A brief explanation is described below;
Container Groups are part of Azure Container Instances and allow you to run multiple containers side by side on the same host, sharing resources like storage and networking. Perfect for tightly coupled workloads that need to communicate internally, like a sidecar pattern.
π Azure Kubernetes Service (AKS)
Short: βGive me Kubernetes, but let Azure manage the heavy lifting.β
Extended: A fully managed Kubernetes service ideal for running complex, distributed applications at scale. AKS gives you full control over orchestration, scaling, networking, and deployments, but it does come with a learning curve.
Examples:
- A large-scale microservices-based application
- Multi-container workloads with service mesh, ingress, and autoscaling
π Azure Container Apps (ACA)
Short: βServerless containers with scaling and orchestration, minus the Kubernetes headache.β
Extended: Azure Container Apps gives you a way to run microservices and containerized apps without worrying about managing underlying infrastructure or Kubernetes.
Examples:
- REST API that scales to zero instances when not in use
- Event-driven worker triggered by a queue
- Microservice communicating with other services over Dapr
π App Service (Web Apps for Containers)
Short: βMy web app is containerized, just get it online.β
Extended: If you have a web app or API packed in a Docker image, App Service can host it with ease. You get built-in CI/CD, scaling, custom domains, and zero cluster maintenance. Great for developers who want to deploy fast.
Examples:
- A Node.js API in a container
- A single-page app with a custom backend
π Azure Batch
Short: βRun this container 10,000 times, go!β
Extended: Best suited for high-performance, parallel workloads. Azure Batch spins up compute resources to run your containers across thousands of instances if needed.
Not for real-time apps, but excellent for batch processing.
Examples:
- Video rendering at scale
- Processing millions of data rows for ML training
π Azure Functions (with containers)
Short: βMy container only needs to do something when triggered and runs Azure Functions logic.β
Extended: You can package your logic in a container and deploy it as a Function. It runs only when triggered by events like HTTP requests, queue messages, or timers, and can scale automatically based on demand. It runs on top of Azure Functions and requires specialized images for this purpose.
Examples:
- Video rendering at scale
- Processing millions of data rows for ML training
π Iβve created a blog about functions as well, which covers this topic. Go check it out! π
π Azure Service Fabric
Short: βI want control over every bit, even if it gets complicated.β
Extended: Service Fabric supports running containers (and code) with advanced orchestration, including stateful services. Itβs powerful and flexible, but has a steeper learning curve and is mostly used in enterprise or legacy scenarios.
Examples:
- Stateful container-based service with failover logic
- Large enterprise systems with complex orchestration needs
π Azure Service Fabric is still supported, maintained, and used in production by many large-scale enterprise applications, including parts of Azure. However, Microsoft has been encouraging most new projects to use other services, especially:
- Azure Kubernetes Service (AKS)
- Azure Container Apps
- App Service for simple web app hosting
π Azure Arc
Short: βLet me run containers anywhere, but manage them like Azure.β
Extended: Azure Arc brings Azure management to your on-prem or multi-cloud environments. You can run Kubernetes clusters (with containers) outside of Azure, but still manage, secure, and monitor them through the Azure portal.
Examples:
- Containers running in your own datacenter
- Edge devices using Kubernetes, managed from Azure
Comparison
With so many options available, choosing the right Azure service for running your containers can feel like solving a puzzle, but donβt worry, itβs one you can absolutely crack. Each solution comes with its own set of features, trade-offs, and ideal scenarios, and understanding those differences can help you avoid headaches (and costs) down the line.
To make things easier, Iβve put together a comparison table that highlights the key characteristics of each option, from infrastructure management and orchestration capabilities to scaling behaviour, complexity, and best-fit use cases. Whether you’re deploying a simple background worker or architecting a full-blown microservices platform, this should give you a solid overview of what each service offers (and what it doesnβt).
Of course, Azure evolves constantly, so Iβll do my best to keep this guide updated as the landscape changes. Now, letβs break it all down π
Feature | Azure Container Instance (ACI) | Azure Kubernetes Service (AKS) | Azure Container Apps | Azure App Service | Azure Functions | Azure Batch | Azure Service Fabric | Azure ARC |
Infra management by consumer | β (none) | β You manage workers | β (none) | β (none) | β (none) | β (none) | β You manage the cluster | β External resources and management |
Orchestration | β (lacks) | β (Kubernetes native) | β (Managed by Azure) | β (lacks) | β (lacks) | β (lacks) | β (Custom) | β (Via ARC Enabled K8s) |
Auto-scaling | β (lacks) | β (Supported) | β (Supported) | β (Supported) | β (Supported) | β (lacks) | β (lacks) | β (Supported if cluster supports it) |
Stateful Workloads | β (lacks) | β (Supported) | β (Supported) | β (lacks) | β (lacks) | β (lacks) | β (Supported) | β (Supported if cluster supports it) |
Event-Driven Support | β (lacks) | β (Supported) | β (Supported) | β (lacks) | β (lacks) | β (lacks) | β (Supported) | β (Supported if cluster supports it) |
Startup Time | β (fast) | β (Medium/slow) | β (fast) | β (fast) | β (fast) | β (Medium/slow) | β (Medium) | β (Depends on environment) |
Ingress / External | β (Supported) | β (Supported) | β (Supported) | β (Supported) | β (Supported) | β (No) | β (Manual setup) | β (Supported) |
Private Networking | β (Supported) | β (Supported) | β (Supported) | β (Supported) | β (Supported) | β (Supported) | β (Supported) | β (Supported) |
Multi-container Support | β (No) | β (Supported) | β (Supported) | β (No) | β (No) | β (Supported) | β (Supported) | β (Supported) |
Monitoring & Logging | β (Supported) | β (Supported) | β (Supported) | β (Supported) | β (Supported) | β (Supported) | β (Supported) | β (Supported) |
Learning Curve | β (Very low) | β (High) | β (Low) | β (Low) | β (Low) | β (Medium) | β (High) | β (High) |
Pricing Model | Pay per second (CPU/mem) | Pay per VM node | Pay per usage (requests + CPU/mem) | App Plan pricing tiers | Pay per execution time | Pay per job + VM | VM-based | Matches underlying infra |
Workload Duration | Short to medium | Long-running supported | Short to long-running | Long-running (web apps) | Short-lived (trigger-based) | Long-running batch jobs | Short & long-running | Any |
Container OS Support | Linux & Windows | Linux & Windows | Linux only | Linux & Windows | Linux & Windows | Linux & Windows | Linux | Linux & Windows |
Best For | Quick wins, simple services | Scalable, production microservices | Lightweight microservices, serverless apps | Web APIs or Dockerized apps | Event-triggered tasks, lightweight APIs | Parallel compute jobs | Stateful, mission-critical apps | Managing containers anywhere |
Explanatory: I flagged with checkmarks the options, and where βnoneβ is added the most preferred option. Iβve taken several parameters into account, like;
- Manageability
- Usability
- Pricing
- Complexity
On the bottom of the table, where the checks are missing, Iβll put down the use cases and other relevant topics where comparison is not relevant.
Summary
Thatβs a wrap! π
In this blog, we took a deep dive into the many ways you can run containers on Azure, from simple, serverless options like Azure Container Instances to fully orchestrated solutions like AKS, and even hybrid scenarios with Azure Arc.
We explored the strengths and trade-offs of each service, covering everything from infrastructure management and scaling to event-driven support and workload duration. Whether youβre spinning up a quick background job, building a resilient microservices architecture, or managing containers across clouds, now you know which Azure service fits best.
π Along the way, we highlighted the key features and ideal use cases so you can confidently choose the right container platform for your project without feeling overwhelmed.
Thanks for sticking around, hope this guide helps you containerize like a pro! π
Feel free to reach out with your container questions or what you plan to build next.
And do note π Iβll keep this one up-to-date as good as I can as technology evolves on Azure regarding containers!
Happy coding and containerizing! π