Setup CD on Azure Kubernetes Service (AKS) with Azure DevOps, Docker Compose and Helm

  1. New release pipeline

    New Release Pipeline

  2. Choose artifact as release source

    In some scenarios, new docker image from ACR or Docker Hub can be set as “Source type” to trigger the release.

    Add An Artifact

  3. Select Helm Chart template to deploy to Kubernetes

    Helm Chart Template

  4. Setup release tasks

    New Stage

    • Authorize to Azure, Resource Group and AKS

      AKS Authorize

    • Install Helm - keep the default settings

      Install Helm

    • Helm Init - tick “Upgrade Tiller”

      Helm Init

      Tiller is a service running at Kubernetes cluster to manage helm charts.

      Note: Arguments is empty, it will install both client and tiller.

      Upgrade Tiller

    • Helm Upgrade - install helm charts in Kubernetes

      Helm Upgrade

      Select tgz package from artifact, regex can be used e.g. helm-*.tgz

      Value File can be used to replace configuration for specific environment e.g. values.Staging.yaml or values.Production.yaml

      Command will be generated like:

        helm upgrade --install --reset-values --values /helm/values.Production.yaml --wait azuredevops /helm-0.1.0.tgz
      

      Helm Upgrade Commands