简体   繁体   English

如何将Vagrant Kubernetes集群连接到Azure DevOps

[英]How to connect a Vagrant Kubernetes cluster to Azure DevOps

I have my own Kubernetes cluster (not AKS) made of several vagrant VMs. 我有自己的Kubernetes集群(不是AKS)由几个流浪的虚拟机组成。 I have one VM for the Master and 2 others for the worker nodes. 我有一个用于主服务器的VM和另外两个用于工作节点的VM。

I'm working with Azure DevOps Pipeline and I would like to deploy my docker container to this Kubernetes cluster. 我正在使用Azure DevOps Pipeline,我想将我的docker容器部署到这个Kubernetes集群。

There is the task Deploy to Kubernetes , but it seems to be only for an AKS cluster. Deploy to Kubernetes的任务,但它似乎只适用于AKS集群。

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. 我曾尝试使用kubeconfig( ~/.kube/config ?)为Kubernetes添加新的服务连接,但我无法验证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. 谢谢你的帮助。

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). 您需要创建kubernetes服务连接,并通过选择kubernetes服务连接(而不是Azure Resource Manager)在发布管道中引用该连接。 Your cluster should be oppublicly accessible. 您的群集应该可以在公共场所访问。

在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM