DEV Community

Cover image for Deploy an Application on AKS Cluster Using A Kubernetes Manifest File
Abisola Adesegun
Abisola Adesegun

Posted on

Deploy an Application on AKS Cluster Using A Kubernetes Manifest File

Table of contents
Step 1: Login to Azure
Step 2: Create Resource group and AKS cluster
Step 3: Connect to AKS Cluster
Step 4: Create a yaml file and deploy the application
Step 5: Verify the deployment
Step 6: Access the Application
Step 7: Clean up

To deploy an application on an Azure Kubernetes Service (AKS) cluster using a Kubernetes manifest file, follow these steps:

Prerequisites:

  • Azure CLI installed.

  • kubectl installed.

  • You have an AKS cluster up and running.

  • Kubernetes manifest file ready (YAML file).

Step 1: Login to Azure

  • First, log in to your Azure account and connect to your AKS cluster: Copy code

Image description

  • Once authenticated, set the subscription

Image description

Step 2: Create Resource group and AKS cluster

  • Create RG

Image description

  • Create an AKS cluster

Image description

Step 3: Connect to AKS Cluster

Image description

Step 4: Create a yaml file and deploy the application

  • Create a yaml file

Image description

  • Deploy the application by running the following command to apply the manifest file to the AKS cluster

Image description

Step 5: Verify the deployment

  • Check the status of the pods:

Image description

  • Check the status of the service and get the external IP

Image description

After a few moments, you should see an external IP address under the EXTERNAL-IP column. You can use this IP to access the Nginx application via a web browser.

Step 6: Access the Application

  • Once the service is deployed, access the application using the external IP of the LoadBalancer:

Using code
http://

Image description

  • Explore the application

Image description

Image description

Step 7: Clean up
using the following command

Image description

Top comments (0)