AZ-104 Microsoft Azure Administrator Exam

You're a great admin... on-prem. Now, become a great admin in the cloud and prove it by passing the Microsoft Certified: Azure Administrator Associate exam!

Practice Test

Exam

Provision and manage containers in the Azure portal

Create and manage an Azure container registry

Azure Container Registry (ACR) is a managed Docker registry service that lets you store and manage container images. ACR integrates seamlessly with Azure services and supports private, secure storage of images. You can create a registry through the Azure portal in minutes by selecting a resource group, registry name, and tier. It’s important to choose the right pricing tier based on your expected throughput and storage needs.

Once your registry is deployed, you can push and pull container images using Docker commands or the Azure CLI. In the portal, you can view the list of repositories, tags, and image manifests. For security, you can enable admin user credentials or integrate with Azure Active Directory for role-based access. This ensures that only authorized users and services can interact with your registry.

You can also configure network rules, including firewall settings and private endpoint support, to restrict access to your registry. The portal allows you to add or remove IP address ranges and virtual networks that can reach your registry. This level of control helps you meet compliance and security requirements in enterprise environments.

In addition, ACR supports geo-replication, which lets you replicate your registry across multiple regions. This feature reduces latency for global deployments and improves reliability. From the portal, you can enable geo-replication and monitor synchronization status across all replicas.

Provision a container by using Azure Container Instances

Azure Container Instances (ACI) offers a quick way to run containers in Azure without managing servers. You simply specify a container image from your registry or Docker Hub, set resource requirements, and deploy. ACI supports both Linux and Windows containers, making it versatile for many application types. There’s no orchestration layer, so each container group runs independently.

When creating a container instance in the portal, you define CPU cores, memory, and optional Azure file shares for persistent storage. You can also assign a public IP address for direct access or keep it private within a virtual network. Environment variables, command overrides, and volume mounts can all be configured in the portal interface to customize how your application runs.

Monitoring and logging are built into ACI through Azure Monitor, where you can track container state, resource usage, and logs. This simplifies troubleshooting and performance tuning. If you need to update your container, you can redeploy a new instance with updated image tags or configuration settings directly in the portal.

ACI is ideal for tasks like batch processing, event-driven workloads, and proof-of-concept deployments. Its serverless nature means you only pay for the seconds your containers run, making it cost-effective for short-lived or variable workloads. Understanding these cost implications helps you optimize your resource usage.

Provision a container by using Azure Container Apps

Azure Container Apps is a serverless container platform designed for microservices and event-driven applications. It abstracts away infrastructure management, allowing you to focus on code. Container Apps integrates with Dapr for building distributed applications and KEDA for event-driven autoscaling. You don’t worry about orchestrators or virtual machines.

In the portal, you start by creating a Container Apps environment, which groups your apps and their shared resources. Then you deploy individual container apps by selecting an image, CPU and memory requirements, and ingress options. You can configure HTTP endpoints, traffic splitting for revisions, and secure secrets via Azure Key Vault integration.

Scaling in Container Apps happens automatically based on metrics like CPU, memory, or custom triggers such as queue length or event hub messages. This lets your application respond to load without manual intervention. Revisions allow you to roll out updates gradually, shifting traffic percentage by percentage until you fully commit to a new version.

Container Apps also supports built-in Observability through logs and metrics in Azure Monitor. You can view request counts, response times, and error rates right in the portal. This level of insight is essential for diagnosing performance bottlenecks and ensuring high availability.

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

Choosing the right size for containers involves balancing performance, cost, and resource availability. In ACI, you select discrete values for CPU and memory per container group. overprovisioning can waste budget, while underprovisioning can cause poor application performance. Always analyze historical usage and conduct load tests before finalizing resource settings.

With Azure Container Apps, you define resource limits and horizontal scaling rules. The platform uses KEDA to monitor event sources and scale the app in or out. You can set minimum and maximum replica counts to control costs and ensure responsiveness. Autoscaling policies are configured through triggers like CPU % or custom metrics.

Scaling in ACI requires creating multiple container groups or using scripts to deploy new instances. In contrast, Container Apps manages replicas automatically within the specified bounds. This difference highlights the serverless nature of Container Apps versus the more manual approach of ACI.

Both services provide metrics in Azure Monitor, such as CPU utilization, memory usage, and instance counts. You can create alerts based on these metrics to notify you when thresholds are breached. Proactive monitoring and scaling ensure your containers handle peak loads without interruption or unexpected costs.

Conclusion

In this section, we explored how to create and manage an Azure Container Registry, providing secure, private storage for container images. We then covered provisioning containers using both Azure Container Instances for lightweight, serverless workloads and Azure Container Apps for microservices with built-in autoscaling. Finally, we discussed strategies for sizing and scaling containers effectively to balance performance and cost. Together, these concepts equip you with the skills to deploy and manage containerized applications in Azure with confidence and efficiency.

Study Guides for Sub-Sections

Azure Container Instances (ACI) provide a platform to deploy containers directly on Azure while bypassing the need to manage the underlying infrastructure. This is especially usefu...

Azure Container Apps provide a platform to deploy and manage containerized applications effectively. This service ensures your workload runs smoothly by integrating with other Azur...

Azure Container Instances (ACI) provide a simple way to run containers in the cloud without the complexity of managing virtual machines or adopting comprehensive orchestration syst...

Azure Container Registry (ACR) is a service designed to store and manage Docker container images for use in Azure deployments. Setting up and securing ACR is esse...