Mohan Golla
4 min readDec 11, 2023

Preparation, Docker Image Push and Deployment for Containerized Voting Application in Kubernetes Cluster using Docker, Azure Container Registry (ACR) and Azure Kubernetes Service (AKS)

In another project based on a real world scenario, I had to act as a DevOps Engineer, and show a new team member how to deploy an application on a Kubernetes cluster.

This cluster is part of The Cloud Bootcamp project, and I prepared this new team member to deploy the voting application that was developed for the MultiCloud Experience, an online event where participants had the opportunity to learn about Cloud technologies.

I deployed it to Microsoft Azure cloud, where I first pushed the application’s Docker image to Azure Container Registry (ACR) and then used the Azure Kubernetes Service (AKS) service to deploy a cluster managed by Microsoft Azure.

Below are few screenshots:

Open Cloud shell and it will ask to create a storage area

Next download the zip files needed and unzip them. Then create resource group and the Azure Container Registry

The login to Cloud Shell to be authenticated with Azure Container Registry

The output has the Access token and loginServer name which will be used to create the Docker image.

Build the image and upload it to the Azure Container Registry (note: the “.” at the end is part of the command that has to run from inside of the application folder)

az acr build — image tcb-vote — registry <acrName> — file Dockerfile .

Gives the image information if we want to pull to the Cloud shell or locally

Create the Kubernetes cluster.

Now we can see the Kubernetes cluster is provisioned.

Attach the ACR to the Kubernetes Cluster so that it can download the image that was created.

Run the get credentials command to get the credentials on Kubernetes Cluster

Make a change in the image path for the tcb-vote-front section of the container in the YAML file so that image name is same as location name in the Azure Container Registry so that Kubernetes can use to provision the application.

Run the Apply command with the deployment file that has been changed with image path.

Kubernetes is going to associate an external IP address. We can check in the Workloads and Services and the tcb-vote and tcb-vote-back are created successfully.

We can see the application is up and running on the browser with the IP address and the counts are persistent.

We can see how easy it is to deploy applications inside the Kubernetes Cluster. Amazing!

Mohan Golla
Mohan Golla

No responses yet