Azure Compute: Containers

This documentation provides an in-depth guide to using container technologies within Azure Compute, covering key services and best practices for deploying, managing, and scaling your containerized applications.

Overview

Containers offer a lightweight, portable, and consistent way to package and run applications. Azure provides a robust set of services to support your containerization journey, from individual container instances to full-fledged orchestrators.

Key benefits of using containers in Azure include:

Azure Kubernetes Service (AKS)

Azure Kubernetes Service (AKS) simplifies deploying, managing, and scaling containerized applications using Kubernetes on Azure. AKS abstracts away the complexity of the control plane, allowing you to focus on your applications.

Key Features of AKS:

Getting Started with AKS:

You can create an AKS cluster using the Azure portal, Azure CLI, or Azure PowerShell. A basic cluster can be provisioned with a few commands:


az group create --name myResourceGroup --location eastus
az aks create --resource-group myResourceGroup --name myAKSCluster --node-count 1 --enable-addons monitoring --generate-ssh-keys
        

For more advanced configurations and management, refer to the official AKS documentation.

Azure Container Instances (ACI)

Azure Container Instances (ACI) is the fastest and simplest way to run a container in Azure. ACI allows you to deploy containers without managing underlying virtual machines or orchestrators. It's ideal for simple applications, task automation, and event-driven scenarios.

When to use ACI:

Deploying a container with ACI:

Deploying a single container is straightforward:


az container create --resource-group myResourceGroup --name myContainer --image microsoft/aci-helloworld --dns-name mycontainer
        

Explore ACI documentation for advanced use cases and networking.

Container Registries

Azure Container Registry (ACR) is a managed, private Docker registry service that stores and manages your private Docker container images and related artifacts. ACR is built on Docker Registry 2.0 and integrates with other Azure services.

Key capabilities of ACR:

Creating an ACR:

Provisioning a registry is done via the Azure CLI:


az acr create --resource-group myResourceGroup --name myRegistry --sku Basic --location eastus
        

Learn more about ACR features in the official ACR documentation.

Best Practices for Azure Containers

To ensure efficient, secure, and scalable container deployments on Azure, consider the following best practices: