DEV Community

Ayomide
Ayomide

Posted on

Deploying A Multi-container Application Using Azure Kubernetes Service

This article is part of a series that delves into developing an application using both AWS and Azure. Please refer to this article for more information on multi-container applications and the advantages of using them.

Prerequisites for the project

To deploy this application using Azure Kubernetes Service (AKS), a few conditions need to be satisfied. You need to have:

  1. An Azure Account
  2. Azure CLI installed
  3. A Github Account

Implementation Of the Project

Setting Up Your Environment

  • You will need to clone the github repository containing the code in order to get started. You can find the starter files here

  • After successfully cloning the files, you will need to connect to your azure account using the az login command.

Creating Azure Resources

  • Create an Azure resource group that will contain all your resources
    Resource Group Creation

  • Create your Azure kubernetes service(AKS) cluster. Specify the resource group you created in the previous step as well as the number of nodes you want your container to have
    AKS container Creation

  • Connect your AKS cluster to kubectl
    connect AKS to kubectl

  • Get the node groups to confirm that your AKS cluster has been properly setup and configured with kubectl
    kubectl get nodes

Deploying Your Aplication

  • Run kubectl apply -f ./config to apply the configuration files. Get the list of services and get the external IP address of the frontend service
    Kubectl get services

  • Visit the external Ip address to view the application
    Working Application

A Word On Cleanup

It is advisable to terminate any resource that is not currently in use. You can always provision them again when you're ready.

  • Delete the Services and pods that you have provisioned
    Delete deployments

  • Delete the AKS cluster

Delete AKS Cluster

  • Finally, delete the Azure resource group Delete Resource Group

Conclusion

This guide covered how to use the Azure Kubernetes service to deploy your applications. I hope that it has helped motivate you to get started using AKS. Happy deploying!

Top comments (0)