Wednesday, 9 October 2019

azure devops pipeline for kubernetes

You need to setup service connection first:

- task: Kubernetes@1
displayName: Deploy in Dev
connectionType: 'Kubernetes Service Connection'
kubernetesServiceEndpoint: 'AKS-DEV'
namespace: 'yournamespace'
command: 'set'
arguments: 'image deployment/yoursexapp$(Build.BuildId)'
secretType: 'dockerRegistry'
containerRegistryType: 'Azure Container Registry'

because this will link and use your docker hub, you can do it by follow below link:

above $(Build.BuildId) is a build in var which will help you auto tag your docker image and auto pick it in k8s