Azure Arc-enabled K8s, --enable-oidc-issuer not working as expected

Kotsantis, Theo 25 Reputation points
2025-04-03T14:44:03.5433333+00:00

I am trying to deploy workload identity federation in Azure Arc-enabled Kubernetes cluster, following instruction in https://learn.microsoft.com/en-us/azure/azure-arc/kubernetes/workload-identity#set-environment-variables

When executing

az connectedk8s connect --name "${CLUSTER_NAME}" --resource-group "${RESOURCE_GROUP}" --enable-oidc-issuer –-enable-workload-identity

I am getting error

Self hosted issuer is required for aks cluster when OIDC issuer is being enabled.

There are no info regarding this resource in the instruction page, and my understanding is this is not required in the first place.

For example the equivalent command for az aks does not require any extra pameter

az aks update --resource-group myResourceGroup --name myAKSCluster --enable-oidc-issuer 
Azure Arc
Azure Arc
A Microsoft cloud service that enables deployment of Azure services across hybrid and multicloud environments.
507 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Deeksha Sharma 0 Reputation points Microsoft Employee
    2025-04-25T21:02:39.6566667+00:00

    Hey @Kotsantis, Theo

    I am from the Arc team. The error statement indicates that you are trying to connect an AKS cluster to arc. When doing that we require that you provide the AKS cluster's issues url when running the connect command. Here are the steps for Arc enabling an AKS cluster with workload identity.

    Create an AKS cluster

    az aks create --resource-group <rg_name> --name <cluster_name> --enable-oidc-issuer --enable-workload-identity --generate-ssh-keys

    Download the cluster credentials

    az aks get-credentials --resource-group <rg_name> --name <cluster_name> --overwrite-existing

    Get the AKS cluster's issuer url

    $AKS_OIDC_ISSUER = "$(az aks show --name <cluster_name> --resource-group <rg_name> --query "oidcIssuerProfile.issuerUrl" --output tsv)"

    Connect it to Arc with workload identity feature enabled

    az connectedk8s connect -g <rg_name> -n <cluster_name> --enable-oidc-issuer --self-hosted-issuer "$AKS_OIDC_ISSUER"

    Providing the --self-hosted-issuer URL is required when connecting an AKS, EKS, GKE, or other public cloud cluster to ARC.
    I will see if we have public documentation for this already and if not, I will ask for that to be created.


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.