Azure Machine Learning Service for Kubernetes Architects: Deploy Your First Model on AKS with AZ CLI v2

Developer Support

Joseph Masengesho provides a step-by-step tutorial on how to deploy your first ML model on AKS.

In a previous post, I provided a lengthy write-up about my understanding of using Kubernetes as a compute target in Azure ML from a Kubernetes architect’s perspective. In this post, I will offer a step-by-step tutorial that teaches you how to deploy your first ML model on AKS. As a disclaimer, I am not a data scientist; however, I work with customers who deploy ML workloads on Kubernetes.

In this tutorial, we will deploy a trained regression model based on the MNIST Dataset, which consists of 60K handwritten digits for training and 10K for testing. The model was created using the scikit-learn framework. You can learn more about how to use it in Azure ML here. We will use Azure CLI v2 (az ml), but you can also use Python SDK v2.

 Image mnistdataset


  • A machine learning workspace. You can learn how to create one here.
  • A Kubernetes cluster. You can learn how to create one here. At minimum, you need a system node pool. We will optionally create a dedicated node pool for this lab.
  • az ml CLI (v2). Learn how to upgrade or install it here.
  • Github Repository: All the scripts used in this lab are available in this repo.

Cloning the repository

The files used in this tutorial are available on my Github in this repo.

Follow the complete tutorial on Joseph’s blog.


Leave a comment

Feedback usabilla icon