az k8s-extension create lacks --yes parameter

Suresh Bettadapur 81 Reputation points
2025-02-09T19:47:25.43+00:00

I am trying to attach an existing AKS cluster as an inference cluster for Azure ML workspace. Following MS instructions - https://learn.microsoft.com/en-us/azure/machine-learning/how-to-attach-kubernetes-anywhere?view=azureml-api-2

az k8s-extension create --name <name> <name> --extension-type Microsoft.AzureML.Kubernetes --config enableTraining=True enableInference=True inferenceRouterServiceType=LoadBalancer allowInsecureConnections=True InferenceRouterHA=False --cluster-type managedClusters --cluster-name <name> --resource-group <RG name> --scope clusterThis is run from GitHub action and fails with error

Interactive authentication is needed. Please run:

az login

Error: Process completed with exit code 1.

Adding --yes flag in the end doesn't work either.

ERROR: unrecognized arguments: --yes

Saw a github issue on the same subject..... [didn't find the answer though]

https://github.com/Azure/azure-cli/issues/28766

Any pointers on how to implement this through GitHJub pipelines?

Able to attach the AKS inference cluster using Terraform. However, it gets attached with type "AksCompute", not "KubernetsCompute" [BTW, trying through Portal, we see types of "AksCompute" and "Kubernetes"]

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.
2,307 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Mounika Reddy Anumandla 2,985 Reputation points Microsoft External Staff
    2025-02-11T03:06:48.34+00:00

    Hi Suresh Bettadapur,

    Thank you for your patience while we are reviewing your query!
    As mentioned in the document, we support two ways to attach a Kubernetes cluster to Azure Machine Learning workspace, using Azure CLI or studio UI.
    https://learn.microsoft.com/en-us/azure/machine-learning/how-to-attach-kubernetes-to-workspace?view=azureml-api-2&tabs=cli#how-to-attach-a-kubernetes-cluster-to-azure-machine-learning-workspace

    Comparison of KubernetesCompute and legacy AksCompute targets

    With the Azure Machine Learning CLI/Python SDK v1, you can deploy models on AKS by using the legacy AksCompute target. Both the KubernetesCompute and AksCompute targets support AKS integration, but the support approach is different.

    The following table summarizes the key differences:

    Capability AksCompute (legacy) KubernetesCompute
    Use the CLI/SDK v1 Yes No
    Use the CLI/SDK v1 Yes No
    Use the CLI/SDK v2 No Yes
    Set up training No Yes
    Apply real-time inference Yes Yes
    Apply batch inference No Yes
    Access new features for real-time inference No new features development Active roadmap available

    In consideration of these differences, and the overall Machine Learning evolution to use the CLI/SDK v2, the recommended approach is to use Kubernetes compute target (KubernetesCompute) for AKS model deployment.

    https://learn.microsoft.com/en-us/azure/machine-learning/how-to-attach-kubernetes-anywhere?view=azureml-api-2#comparison-of-kubernetescompute-and-legacy-akscompute-targets

    As per my understanding, when using Terraform, the default attachment type for AKS clusters in Azure ML is AksCompute, not KubernetesCompute.

    Hope this helps!

    Let me know if you have any further queries!

    If the comment is helpful, please click "upvote" to let us know.


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.