Issue with Azure Pipeline: Unable to Fetch Cluster Credentials Due to Disabled Local Accounts on AKS

Ayoola Fakoya 0 Reputation points
2025-01-28T12:54:04.03+00:00

Hello everyone,

I'm experiencing an issue when creating an Azure Pipeline for my AKS cluster. When I try to choose a namespace in the field during pipeline creation, I receive the following error:

"Error while fetching cluster credentials. Make sure you have clusterAdmin permissions on the cluster. Error from external server: Failed to query service connection API: 'https://management.azure.com/subscriptions/xxxxxxxxxxxxx/resourcegroups/az-xxxx-xxxxx-rg/providers/Microsoft.ContainerService/managedClusters/xxxxxxx-xxxxxx/accessProfiles/clusterAdmin/listCredential?api-version=2018-03-31'. Status Code: 'BadRequest', Response from server: '{ "code": "BadRequest", "details": null, "message": "Getting static credential is not allowed because this cluster is set to disable local accounts.", "subcode": "" }'"

It seems that my AKS cluster has local accounts disabled, which is preventing the pipeline from using static credentials to access the cluster. I'm not sure how to proceed with creating the pipeline given this security setting. Any guidance on how to properly set up an Azure Pipeline for an AKS cluster with disabled local accounts would be greatly appreciated.User's image

User's image

Community Center Not monitored
{count} votes

1 answer

Sort by: Most helpful
  1. Manu Philip 20,206 Reputation points MVP Volunteer Moderator
    2025-01-28T16:57:16.86+00:00

    Hi Ayoola Fakoya

    In order to create Service Connections in DevOps, it is required to enable the Kubernetes local accounts. It is currently the limitation in the Azure DevOps

    You can see some reference also here

    Hope this helps.


    --please don't forget to upvote and Accept as answer if the reply is helpful--

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.