🔴 FREE LIVE WEBINAR
How to Become a DevOps Engineer in 2027
From Zero to DevOps Champion!
November 21st, 2026
9:30 AM CST
Live DevSecOps CI/CD Demo
Career Roadmap • Live Q&A
REGISTER FOR FREE →
100% FREE • Live on Zoom
🎁 FREE CAREER GUIDE
2027 AI-Enabled DevSecOps Career Roadmap
Your Career Journey Starts Here!
📘
9-Stage Learning Roadmap
15-Week Study Plan
8-Page PDF + 12 Interview Q&As
GET FREE ROADMAP →
100% FREE • Delivered to Your Inbox
🚀 NEW WEEKEND BATCH
AI-Enabled DevSecOps & Cloud Engineering Bootcamp
Starts December 5th, 2026
Sat: 9:30 AM – 11:30 AM CST
Sun: 10:30 AM – 12:30 PM CST

15 Weeks • 70+ Labs • Live Training
REGISTER FOR BOOTCAMP → Explore Bootcamp →
Enrollment Open!
3,500+ Students Trained
25+ Years of IT Experience
70+ Hands-On Labs
🔴 Free Webinar Register Free
🎁 Free Roadmap Get Roadmap
🚀 Weekend Batch Enroll Now →

Monday, November 8, 2021

How to Deploy Docker Containers into AKS cluster using Azure Pipelines | Deploy Docker Image into AKS cluster using Azure Release Pipelines

We are going to learn how to deploy Docker containers into Azure Kubernetes Cluster(AKS) using Azure pipelines. We will take a simple python app, create docker image and deploy docker image into AKS cluster using Azure pipelines.


Watch the steps in YouTube channel:


Pre-requisites:

1. AKS cluster needs to be up running. You can create AKS cluster using one of the below options:

2. ACR is also setup in Azure cloud. 
3. Already created Azure DevOps dashboard in 
4. Dockerfile created along with the application source code

Implementation Steps
Step 1 - Create Azure Build pipeline for building Docker images and uploading into ACR
Step 2 - Create Azure Release pipeline for deploying Docker containers into AKS
 
Step 1 - How to create a Azure Build Pipeline

1. Login into your Azure DevOps dashboard
2. Click on Pipelines.

3. Click on New Pipeline

4. Click on use the classic editor
Enter your repo name and branch name where you have stored your source code along with Dockerfile

Click on Continue. Now choose the template by typing Docker, Select Docker container and Apply.
 

Now pipeline is created with two tasks already. We need to configure it.

Let's modify Build an image task.


Select Push an image task

Add a task for Copying YAML file, enter the Kubernetes deployment YAML file

Add Publish artifact task


Now click Save + Queue and run to start Building the pipeline



Once the build is completed, you should be able to see the Docker images under 
Services --> Repositories


Step 2 - How to Create Release pipeline for deploying Docker containers into AKS Cluster 

Go to Pipelines --> Click on Releases --> New Release pipeline

Click on Stage 1 and choose a template by selecting
Deploy to a Kubernetes cluster and click on Apply


Change the stage name to Deploy to AKS


Now click on Add an artifact


Select the Build pipeline and click on the latest version

Now click on Deploy to AKS stage
Click on kubectl apply


Now Click on New to enter AKS cluster connection info


Choose the Azure subscription and enter Microsoft user credentials.



Select AKS cluster from the drop down, choose default namespace


Choose command as apply and select the yaml file from the dropdown from Configuration file 



Now click on Save,
Click on Create a release
and then click Create to run the deployment


Click on Stage to see the logs

Now you will the following tasks are in green to confirm Deployment was successful.


Let's check if deployment created any pods

kubectl get deployments

kubectl get pods

kubectl get svc



Now try to access application running inside AKS cluster by using external IP and port number


Go to the browser enter http://external IP:5000