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.
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_NAMEAKS_CLUSTER_NAMERESOURCE_GROUPAny 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
PATPaste 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:
โ
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.