0

Creating a service connection to access non-private AKS cluster is straight forward, however if i want to create service connection for private AKS cluster is it possible from Azure Devops?

Shruthi Bhaskar
  • 1,212
  • 6
  • 20
  • 32
  • 3
    A service connection isn't defined to connect to a particular thing. In short to get for example a pipeline to deploy to a private resource, I needed to provision a VM connected to the same VNET, install a devops hosted build agent on there and use that to connect. The MS hosted buikd agents won't be able to connect to a private resource – Nick.Mc Oct 04 '21 at 03:25
  • Yeah, i figured. So now i am using self hosted vm as devops agents with network configuration from vm to AKS cluster and using it as build agents. – Shruthi Bhaskar Oct 05 '21 at 06:20

2 Answers2

0

You can create New Kubernetes service connection using the KubeConfig option and click the dropdown arrow to choose Save without Verification

Also see Deploying to Private AKS Cluster

Emil
  • 2,196
  • 2
  • 25
  • 24
  • But does communication works from Microsoft hosted agents to Private AKS using KubeConfig service connection? – Uday Kiran Jul 22 '22 at 10:34
  • Not out of the box - only if you have advanced networking skills to "white list" Microsoft hosted agents, which is NOT recommended. Your best option for Private AKS cluster is to use self-hosted agent, which is already on your internal network. – Emil Aug 01 '22 at 13:36
  • Yes. Did that in last week using VMSS hosted agent. However, there is some issue with KubernetesManifest@0 Azure DevOps task while creating the secret. https://stackoverflow.com/questions/73098411/kubernetesmanifest-createsecret-fails-with-illegal-base64-data-at-input-byte-432 – Uday Kiran Aug 01 '22 at 14:03
0

Please use below link https://techcommunity.microsoft.com/t5/fasttrack-for-azure/using-azure-devops-to-deploy-an-application-on-aks-private/ba-p/2029630

I have impleted this solution in my place, we had private aks , we where unable to make service connection from azure devops to azure kubeneted,

we created a self hosted linux agent in the subnet where kubenetes is and add used my agent to run build and release pipeline

Satyam Pandey
  • 593
  • 2
  • 10
  • 32