Modern-day applications are being built using containers more and more often to take advantage of the increased portability and efficiency. As these applications become more complex, they grow to span multiple containers across multiple servers. Kubernetes, an open-source container management tool, helps deploy and manage containers at scale and manage this complexity. In this article, we will discuss how to deploy to Kubernetes using Azure DevOps Services.

Setting up a Kubernetes Cluster

Azure Pipelines can be used to deploy container images to Kubernetes. First, you must set up a Kubernetes cluster. To do this, you can use the Kubectl task to deploy, configure and update a Kubernetes cluster. This task works with Azure Resource Manager and Kubernetes Service Connection. Kubectl is a command-line tool that allows you to manually run commands against Kubernetes clusters. If you are comfortable, you can also use YAML to run these commands. This gives the added benefit of being able to create more complex structures.

Azure Kubernetes Service (AKS) is a simpler way of deploying a Kubernetes cluster in Azure. This service is an open-source and fully managed Kubernetes service that offers an integrated continuous integration and continuous delivery (CI/CD) experience. When you deploy an AKS cluster, the master and all nodes are configured for you. Things like Azure Active Directory integration and monitoring can be configured during the deployment process.

Deploy to Kubernetes

Now that your cluster is set up, you’re ready to get started with your deploying to Kubernetes. Because Azure Pipelines is so flexible, there are several different methods to complete this task. For example, you can simply use the Kubernetes resource view within your environments. This view allows for traceability from the Kubernetes object back to the pipeline, and back to the original commit. This traceability is provided by the KubernetesManifest task. The KubernetesManifest task will also check for object stability and will even deploy according to your deployment strategy.

You can also use Helm to simplify your deployment. Helm is a package manager for Kubernetes that is used to deploy and manage Kubernetes apps. Azure Pipelines has built-in support for Helm charts, so you are ready to go without any additional extensions. For our purposes, the Helm build and deploy task in Azure Pipelines is perfect for packaging your app and deploying it to your Kubernetes cluster.



Kubernetes can be an intimidating tool to use, especially if you’re new to it. There is no shortage of methods to deploy to Kubernetes, but it’s most important to find the method that works best for your team. For more information about deploying to Kubernetes, or to get started today, contact our team of experts.