unrecognized arguments: --host-group-id When creating AKS cluster with Dedicated Host

Bruno Neves 20 Reputation points
2023-08-02T14:16:01.12+00:00

I'm trying to create an AKS cluster using a dedicated host.

I'm following this documentation: https://learn.microsoft.com/en-us/azure/aks/use-azure-dedicated-hosts

For the dedicated host I'm using DCSv2-Type1 as I need an host with a cpu that supports Intel SGX.

All steps go good but in the step https://learn.microsoft.com/en-us/azure/aks/use-azure-dedicated-hosts#create-an-aks-cluster-using-the-host-group whe I create the aks cluster and specify to use the host group with argument --host-group-id, I receive an error:

az aks create -g brunoneves-test -n ab-devops-test --location northeurope --nodepool-name app --node-count 1 --host-group-id /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx/resourceGroups/brunoneves-test/providers/Microsoft.Compute/hostGroups/ab-devops-test --node-vm-size Standard_DC2s_v2 --enable-managed-identity --assign-identity /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx/resourcegroups/brunoneves-test/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ab-devops-test
unrecognized arguments: --host-group-id /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx/resourceGroups/brunoneves-test/providers/Microsoft.Compute/hostGroups/ab-devops-test

Documentation is very clear that I need to use --host-group-id argument but then CLI throws an error saying it does not recognize the argument.

I've updated my azure CLI to latest version until today:

$ az version
{
  "azure-cli": "2.51.0",
  "azure-cli-core": "2.51.0",
  "azure-cli-telemetry": "1.1.0",
  "extensions": {
    "aks-preview": "0.5.41",
    "log-analytics": "0.2.1"
  }
}


In documentation in that link: "Before you start, ensure that your version of the Azure CLI is 2.39.0 or later"

Anyone can help me on this?

Thanks in advance.

Regards,

Bruno Neves

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,376 questions
{count} votes

Accepted answer
  1. shiva patpi 13,366 Reputation points Microsoft Employee
    2023-08-02T19:44:03.48+00:00

    Hello Bruno Neves,

    I am summarizing the actions we took in the answer section so that you can go-ahead and accept the answer which will be helpful to other members who are looking for similar answers !!

    -> Initially below command failed in your local system:

    az aks create -g brunoneves-test -n ab-devops-test --location northeurope --nodepool-name app --node-count 1 --host-group-id /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx/resourceGroups/brunoneves-test/providers/Microsoft.Compute/hostGroups/ab-devops-test --node-vm-size Standard_DC2s_v2 --enable-managed-identity --assign-identity /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx/resourcegroups/brunoneves-test/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ab-devops-test

    unrecognized arguments: --host-group-id /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx/resourceGroups/brunoneves-test/providers/Microsoft.Compute/hostGroups/ab-devops-test

    -> We tested using Azure Portal CLI - it went through

    -> Then you've uninstalled the CLI and reintalled latest version 2.51.0 same as 1st post.

    -> Then you 've also deleted the .azure folder on your home folder

    -> Later you've executed the command to create the AKS cluster and it worked.

    Regards,

    Shiva.

    0 comments No comments

0 additional answers

Sort by: Most helpful

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.