DEV Community

Cover image for Deploying a Kubernetes Application on Azure Kubernetes Service (AKS): From Cluster Creation to Live Deployment
Kolarinde Awopetutimileyin
Kolarinde Awopetutimileyin

Posted on

Deploying a Kubernetes Application on Azure Kubernetes Service (AKS): From Cluster Creation to Live Deployment

Step 1 — Create a Resource Group and Verify It


Using PowerShell, run az group create --name aks-rg --location westus3 to create a dedicated resource group for the AKS cluster. Follow up with az group list to confirm the resource group was created successfully (status: "Succeeded") alongside other existing resource groups in the subscription.

Step 2 — Create the AKS Cluster


In the VS Code integrated terminal, run az aks create --resource-group aks-rg --name my-aks-cluster --node-count 1 --generate-ssh-keys to provision the Kubernetes cluster. Azure returns a detailed JSON response describing the cluster configuration, including agent pool profiles, node count, and orchestrator version.

Step 3 — Verify the Cluster and Get Credentials


Run az aks list --output table to confirm the cluster ("my-aks-cluster") shows a Succeeded provisioning state, running Kubernetes version 1.34.6 in the westus3 region. Then run az aks get-credentials --resource-group aks-rg --name my-store-cluster to merge the cluster's credentials into your local kubeconfig for kubectl access.

Step 4 — Confirm Node Connectivity

 g)
After credentials are merged (confirmed by "Merged 'my-aks-cluster' as current context"), run kubectl get nodes to verify the cluster node is Ready and running Kubernetes version v1.34.6.

Step 5 — Deploy the Application and Check Pods


Apply your Kubernetes manifest with kubectl apply -f my-aks.yaml, which creates the deployments and services (RabbitMQ, order-service, product-service, store-front). Run kubectl get pods to confirm all pods are Running (or initializing) as expected.

Step 6 — View the Live Application


Navigate to the cluster's public IP in a browser to view the deployed application — in this case, a "Contoso Pet Store" storefront displaying a product catalog with images, descriptions, prices, and "Add to Cart" functionality, confirming the full stack is live and accessible.

Top comments (0)