Unable to create service connection for kubernetes

azlan 0 Reputation points

Unable to create service connection for kubernetes,

Hi team,

Can someone please look into the below issue,

I am unable to establish service connection for aks ,

I am getting error as mention above.

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
1,647 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. AirGordon 6,775 Reputation points

    There are 3 things you should check

    1. Check if your cluster has been configured as a Private Cluster. If so, you'll need to be on the same network.
    2. Check to see if your cluster has been configured with IP Whitelisting. If so, you'll need to ensure your source IP is in the list
    3. Ensure the cluster is healthy by looking at the service in the Azure Portal. Explore the troubleshooting options inside the service blades in the portal to pinpoint.
    0 comments No comments

  2. KarishmaTiwari-MSFT 16,482 Reputation points Microsoft Employee


    Here are some possible solutions that might help:

    • Ensure that the Kubernetes cluster is accessible to Azure DevOps at the time-of-service connection configuration.
    • Check if the service account secret is listed and follow the steps mentioned in this Stack Overflow post to fix it.
    • If you’re using a pre-created Kubernetes configuration stored locally, make sure that it’s accessible to Azure DevOps at the time-of-service connection configuration.
    • If you’re using the ‘kubeconfig’ option, install kubectl and kubelogin on your self-hosted build agent and use shell scripts to create a service connection.
    • Create a service account in your AKS with a secret and use it to create a service connection

    Please go through these posts on similar issue and try the suggested solutions:

    I hope this helps! Let me know in the comments if you have further questions. Comment is the fastest way to reach the experts for any questions or help you need.

    Please don’t forget to Accept Answer and hit Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members for remediation for similar issues.

    0 comments No comments