Deploy a Python App to an AKS Cluster Using Azure Pipelines

1.5 hours
  • 4 Learning Objectives

About this Hands-on Lab

You are responsible for deploying a Python app to AKS. You have the code and a pipeline template, and you must create a CI/CD pipeline in Azure DevOps.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Create an Azure DevOps Organization
  1. Log in to the Azure portal using the provided credentials.
  2. Search for Azure DevOps from the Services menu.
  3. Create a new organization and project named MyFirstProject.
Import Code and Setup Environment
  1. Import the code from this GitHub repository.
  2. Go to Pipelines > Environments to make Azure DevOps aware of your AKS cluster.
  3. Create an Azure Container Registry (ACR) with the premium SKU and admin enabled.
  4. Create a service connection for the ACR in Azure DevOps.
Create the CI/CD Pipeline
  1. Modify the manifest to change the azure-vote-front container image location.
  2. Create a new pipeline from the code in Azure Repos.
  3. Select an existing YAML from the repository.
  4. Modify the pipline YAML to include your ACR DNS name.
Access the AKS Cluster
  1. Access the AKS cluster from Cloud Shell using the command az aks get-credentials.
  2. List the Kubernetes services.
  3. Copy the External-IP from the azure-vote-front service into a new browser tab.
  4. Vote for Dogs or Cats.

Additional Resources

Start by logging in to the Azure portal and searching for Azure DevOps from the Services menu. Then, create a new Azure DevOps organization and project named MyFirstProject.

Select Azure Repos and import the following code: https://github.com/linuxacademy/content-az400-lab-resources.git

The application is located on the aks branch. Create a pipeline from the aks branch, modify the YAML to build, and deploy to AKS. Make sure to create an Azure Container Registry (ACR) and a service connection in Azure DevOps.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?