azureblog.co.uk
← AZ-104 study plan
AZ-104 · Deploy and manage Azure compute resources

Provision and manage containers

Store images in Azure Container Registry, run containers with Azure Container Instances or Azure Container Apps, and size and scale them.

  • 15 min
  • 4 concepts
  • Try it yourself
  • 5-question check

Learn

A container packages an app with everything it needs to run, so it behaves the same on a laptop and in Azure. Containers start in seconds and share the host's kernel, which makes them lighter than VMs.

For AZ-104 you need three services: a registry to keep images in, and two ways to run them without managing servers.

  1. 1

    Create and manage an Azure container registry

    Azure Container Registry (ACR) is a private registry for container images and related artefacts. Tiers are Basic, Standard and Premium; Premium adds geo-replication, private endpoints and higher throughput.

    Authenticate with Microsoft Entra identities and roles such as AcrPull and AcrPush. The admin user account is a shared credential and is off by default; keep it off. ACR Tasks can build images in Azure.

    Remember: Give services a managed identity with AcrPull rather than using the admin user.

  2. 2

    Provision a container by using Azure Container Instances

    Azure Container Instances (ACI) runs a container on demand with no VMs or cluster to manage. You choose the image, CPU and memory, OS type, and whether it gets a public IP and DNS name or runs in a virtual network.

    A container group is a set of containers scheduled on the same host that share a lifecycle, network and storage, like a pod. Restart policies are Always, OnFailure and Never.

    Remember: ACI suits simple apps, batch jobs and build agents.

  3. 3

    Provision a container by using Azure Container Apps

    Azure Container Apps is a serverless platform for microservices and container-based apps, built on Kubernetes without exposing it. It includes HTTPS ingress, revisions for rolling updates and traffic splitting, and built-in autoscaling.

    Apps live in a Container Apps environment, which is the secure boundary and shares a virtual network and logging between apps.

    Remember: Container Apps can scale to zero, so you pay nothing when idle on the consumption plan.

  4. 4

    Manage sizing and scaling for containers, including Azure Container Instances and Azure Container Apps

    In ACI you set CPU and memory per container when you create it. Scaling means running more container groups; ACI has no built-in autoscale.

    Container Apps scales with scale rules based on HTTP traffic, events (KEDA scalers such as queue length), CPU or memory, between a minimum and maximum number of replicas.

    Remember: Need autoscaling? Container Apps. Need one container quickly? ACI.

Which container service?

Azure Container Instances
  • Single container or small group
  • Starts in seconds
  • No autoscale
  • Batch jobs, simple apps
Azure Container Apps
  • Microservices and APIs
  • Autoscale incl. to zero
  • Revisions and traffic splitting
  • Kubernetes managed for you
Azure Kubernetes Service
  • Full Kubernetes API
  • You manage node pools
  • Most control
  • Not covered in depth in AZ-104

Try it

Answer two questions to pick the service.

This interactive part needs JavaScript.

In the portal

  • Create a registryAzure portal: Container registries > Create
  • Run a container instanceAzure portal: Container instances > Create
  • Create a container appAzure portal: Container Apps > Create
  • Scale rules for a container appAzure portal: Container Apps > your app > Application > Scale

Key terms

Click a card to see the definition.

Check your understanding

5 questions. Score 80% or more and these skills are marked as confident in your AZ-104 study plan.

  1. Which ACR tier adds geo-replication and private endpoints?

  2. Which service can scale a containerised API to zero when idle?

  3. What's the recommended way for an App Service or container app to pull from ACR?

  4. In ACI, what shares a lifecycle, network and storage on one host?

  5. Does Azure Container Instances autoscale on its own?

Sources

Facts in this lesson are from Microsoft Learn. This site isn't affiliated with Microsoft.