azure-container-instances

Introduction to Azure Container Instances: Simplifying Container Management

In the present day, containers are an essential aspect of the processes of developing and deploying applications in this more cloud-first world. Now it is easier for developers to package their applications and all of their dependencies so that applications can be successfully deployed in various situations. Microsoft Azure provides Azure Container Instances (ACI) which is a service to easily put up containers in the cloud without the hassle of having to manage the servers by yourself.

For those preparing for the AZ-104: Microsoft Azure Administrator certification, it’s important to understand how Microsoft Azure supports this with services like Azure Container Instances plays a crucial role in the cloud without the hassle of managing servers

This blog is particularly focused on Azure Container Instances, its essential features, and an example activity where you will deploy your first container using ACI. This guide aims at ensuring that by its conclusion, one is able to know how to make use of ACI in containerized applications. 

What is Azure Container Instance (ACI)?

Azure Container Instances is a serverless container platform that allows you to run containers without worrying about the infrastructure. It is most suitable for cases when users want to deploy containers quickly and have auto-scaling capabilities with no cordial necessity of managing cluster orchestrations.

Characteristics:

Serverless architecture: There are no virtual machines or orchestrators to manage. Deploy your container and leave everything else to Azure.

Fast start-up times: The containers can be spun up in a matter of seconds making it ideal for the running of event-driven applications or for the scaling of microservices.

Per second meter: You pay only for what you utilize. For the resources, the Azure billing system is exclusively for the volume of memory and CPU utilized.

Security and privacy: Containers are executed in this architecture known as ACI and its components are in a virtual envelope for security and protection.

Joining other Azure services: ACI can easily be used in conjunction with other Azure services such as Azure Virtual Networks, Azure Storage, and Azure Monitor.

Why Use Azure Container Instances?

ACI is perfect for developers who want:

  • A lightweight solution to run containers without managing VMs or complex orchestration tools like Kubernetes.
  • To run temporary workloads that need to scale quickly (e.g., data processing jobs, automated builds, or batch processing).
  • Cost-effective containerized applications that do not require full-fledged orchestration.

Some use cases for ACI include:

  • Microservices architecture
  • Event-driven containers
  • Development and testing environments
  • Burst or elastic scaling for existing applications
  • Batch jobs and data processing

How Azure Container Instances Work

With ACI, you define a container by specifying the container image, resource requirements (CPU, memory), networking options, and storage needs. Azure will then create the container in an isolated environment and start it within seconds. You can manage and monitor the container via Azure Portal, CLI, or Azure Resource Manager (ARM) templates.

Real-Time Example: Deploying a Web Application with ACI

For the hands-on part of this tutorial, you will need to log in to our Whizlabs. You will need to log in with our credentials (Email ID and Password)

Click on the platform panel, select Hands-on Labs and you will be redirected to the Hands-on Lab page.

whizlabs-home-page

 

Click on Get Started so that you will be redirected to the Hands-on Labs page.

whizlabs-hands-on-lab-page


Please search for Azure Container Instance in the search tab. You will find Azure Container labs for hands-on practice. For hands-on practice, we will use the Deploy Azure Container Instances lab. Click on the Deploy Azure Container Instances lab.

deploy-azure-container-instances-lab

 

Once you click the Start button, you will be redirected to the lab page. Click on ‘Start Guided Lab’ to begin the lab.

start-guided-lab

To start the lab, we must enable the button by participating in Whizlabs Training. Agree to the Whizlabs Term of User and click ‘Start lab’.

start-lab

The lab will begin with Whizlabs User’s Credentials, including Username and password. We provide lab steps along with the screenshots to be followed in the Azure Portal. Click on the ‘Open Console’ Button which will redirect you to the Azure Portal.

open-console

Please provide the username and password provided by Whizlabs on the sign-in page.

microsoft-azure-username

microsoft-azure-password

 

azure-services-page

Creation of Azure Container Instance

Once the Azure Portal is opened, We will create the Azure Container Instance through Azure CLI. In the Azure Portal, open the Azure CLI within the Cloud Shell pane.

azure-services-page

In the pop-up box, Click on Bash.

azure-cloud-shell

In the getting started box, we have to enter the following details and click on apply.
Select “No storage account required”.
Subscription: Select your own subscription

 getting-started-boxNow, in the terminal, we will deploy the Azure Container Instance using a command. Here is the command to be executed in the Azure CLI

az container create –resource-group <your-resource-group-name> –name <container-instance-name> –image mcr.microsoft.com/azuredocs/aci-helloworld:latest –dns-name-label <unique-dns-name> –ports 80

Explanation:

az container creates: This command allows us to create an Azure Container Instance using the Azure CLI.

–resource-group: This parameter indicates to which Azure resource group the container instance shall be deployed. We have to replace it with the name of the resource group provided in the lab.

–name <container-instance-name>: This gives a name to the container instance. You need to replace <container-instance-name> with your desired name for the container.

–image mcr.microsoft.com/azuredocs/aci-helloworld:latest: This specifies the Docker container image to be used. In this case, it’s using a sample image called “aci-hello world” hosted in the Microsoft Container Registry (MCR). The image is a simple web application that will display “Hello World.”

–dns-name-label <unique-dns-name>: This sets a unique DNS name for your container instance. Replace <unique-dns-name> with a unique identifier. 

–ports 80: The port 80 is used to allow the web traffic(HTTP Traffic) to the Azure Container Instance. 

Verifying the Deployment of an Azure Container Instance

Once the deployment is successfully completed, we will check if the resource has been deployed. Click on the ‘Go to resource’ button on the deployment page.

deployment-of-azure-container

On the Overview page of the Azure Container Instance, check whether the instance status is ‘Running.’ Locate the Fully Qualified Domain Name (FQDN) and copy it.

fully-qualified-domain-name

Copy the FQDN URL and paste it into a new tab. You will be able to see the Welcome page as shown below.

welcome-to-azure-container-instances

Understanding the Azure Metrics Chart in Azure Container Instance

Scroll down on the Overview page to view the Azure Metrics charts. Hit the FQDN URL 4-5 times to simulate the request-response cycle. Please wait for 2-5 minutes and refresh the page if the graph does not display the traffic details

azure-metrics-chart

You can see the following charts:

  • CPU: Provides details on CPU usage.
  • Memory: Provides details on RAM memory usage.
  • Network Bytes Received
  • Network Bytes Transmitted

The metrics above will help us understand the incoming traffic, outgoing traffic, and how they are affecting the container.

Conclusion:

Azure Container Instances (ACI) is Microsoft Azure’s solution for managing containers on the cloud rapidly and affordably. Whether your use case involves deploying microservices, batch tasks, or event-driven apps, ACI is a great method to deploy containerized applications without having to handle host infrastructure.

By following the real-time scenario presented in this blog, you can deploy your applications using ACI with just a few commands. Why not give ACI a try and discover how you can seamlessly incorporate it into your cloud architecture for your applications?

To gain hands-on experience with Azure Container Instances, explore the scenario outlined above in our Hands-on Labs and try it in our Azure Sandbox environments. This practical experience will enhance your skills and provide the knowledge necessary to help you clear your certification exams. I highly recommend that you take advantage of the Azure Container Instances labs in our Whizlabs.

 

About Swetha Selvakumar

Swetha is a certified Labs Support Engineer and passionate cloud enthusiast. With a deep commitment to helping others succeed in their cloud certification journeys, she shares her experiences and insights to guide and inspire fellow learners. Her goal is to simplify the certification process and empower individuals to achieve their cloud computing goals with confidence.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top