How to connect a Vagrant Kubernetes cluster to Azure DevOps

4/12/2019

I have my own Kubernetes cluster (not AKS) made of several vagrant VMs. I have one VM for the Master and 2 others for the worker nodes.

I'm working with Azure DevOps Pipeline and I would like to deploy my docker container to this Kubernetes cluster.

There is the task Deploy to Kubernetes, but it seems to be only for an AKS cluster.

Is there a way to connect the pipeline with my own cluster ?

I've tried to add a new Service Connection for Kubernetes using the kubeconfig (~/.kube/config ?) but I was not able to verify the connection from Azure DevOps. I guess I need to do something on the VMs to make it reachable from internet and allow the connection. How can I do that ?

Thanks for helping me.

-- iAmoric
azure
azure-devops
kubernetes
vagrant

1 Answer

4/12/2019

You need to create a kubernetes service connection and reference that connection in the release pipeline by picking kubernetes service connection (instead of Azure Resource Manager). Your cluster should be oppublicly accessible.

enter image description here

-- 4c74356b41
Source: StackOverflow