Azure DevOps CI/CD Pipeline with AKS and ArgoCD by Mani Karthik GurramAzure DevOps CI/CD Pipeline with AKS and ArgoCD by Mani Karthik Gurram

Azure DevOps CI/CD Pipeline with AKS and ArgoCD

Portfolio project
Mani Karthik Gurram

Random Name Selector - Azure DevOps CI/CD with AKS - ArgoCD

This project demonstrates a fully automated DevOps pipeline using Azure cloud resources. It utilizes Azure Virtual Machines (VM) for a self-hosted agent, Azure Kubernetes Service (AKS) for deployment, Azure Container Registry (ACR) for image storage, and Azure DevOps for CI/CD pipelines.

๐Ÿ› ๏ธ Prerequisites

Before running this project, ensure the following Azure services are properly set up:
โœ… A Virtual Machine (VM) is deployed (Ubuntu recommended) for self-hosted agent configuration.
โœ… An Azure Container Registry (ACR) is created and accessible by AKS with attach-acr policy
โœ… An Azure Kubernetes Service (AKS) cluster is configured and running. az aks create --name random-app-aks --resource-group app2 --node-vm-size Standard_B2s --enable-addons monitoring --attach-acr random-app
โœ… kubectl, docker, and git are installed on the VM and configured.
โœ… Azure CLI is installed and logged in with your Azure subscription.
โœ… The AKS context is added using aks get-credentials --name aks --resource-group new2 `.

๐Ÿš€ Getting Started

Step 1: Clone or Import the Repository

Clone or import this repository into your Azure DevOps project.
git clone https://dev.azure.com/<your-org>/<your-project>/_git/<repo-name>

Step 2: Configure a Self-Hosted Agent on Azure VM

Follow the agent doc in Azure devOps agent profile to set up a self-hosted agent on your Azure VM.

Step 3: Set Up the Azure Pipeline

Navigate to the Pipelines section in Azure DevOps.
Use the provided azure-pipeline.yml file.
Modify the following variables inside the pipeline as per your Azure subscription:
ACR_NAME
AKS_CLUSTER_NAME
RESOURCE_GROUP
Any repository-specific paths or settings.

Step 4: Configure Personal Access Token (PAT)

Go to User Settings > Personal Access Tokens in Azure DevOps.
Generate a PAT with at least Code (Read & Write) and Build (Read & Execute) scopes.
In your pipeline settings (under "Variables"):
Add a new variable named PAT
Paste the token as the value
Mark it as secret

Step 5: Run the Pipeline

Once everything is configured:
Trigger the pipeline manually or automatically on commit.
Verify that all stages complete successfully.
Monitor your AKS cluster using:
kubectl get pods
kubectl describe pod <pod-name>
kubectl logs <pod-name>

โœ… Notes

Modify the Kubernetes deployment manifest (k8s-file/Deployment.yml) to suit your image naming and ports.
This repo uses a shell script (Update-k8s-Manifest.sh) to update the image tag dynamically using the pipeline build ID.
Ensure that your AKS has the correct permissions to pull from ACR.

๐Ÿ“ฆ Tech Stack

Azure DevOps
Azure Container Registry (ACR)
Azure Kubernetes Service (AKS)
Azure VM (Self-Hosted Agent)
Docker
Git
Bash scripting

0 likes ยท 9 views ยท Oct 6, 2025

Implemented a DevOps pipeline using Azure DevOps, AKS, and ACR. Implemented CI/CD pipeline to deploy directl to AKS cluster and Argo CD aaproach, reduce time.

Tags