skip to Main Content

When I execute the following command for adding node pool in Azure CLI, getting the error "unrecognized arguments aks-custom-headers windowscontainerruntime=containerd"

az aks nodepool add –resource-group resource-group-name –cluster-name [cluster] –os-type Windows –name nodepool –node-vm-size Standard_D4s_v3 –kubernetes-version 1.20.5 –aks-custom-headers WindowsContainerRuntime=containerd, –node-count 1

enter image description here

2

Answers


  1. I tried to run below CLI commands to add node pool in aks with custom header refer below:-

    My az cli version:- 2.45.0

    az --version
    

    enter image description here

    Installed aks-preview extension in my cli like below:-

    Code:-

    az extension add --name aks-preview
    

    Output:-

    enter image description here

    Created aks cluster with Admin username and password for aks custom header windows profile to work like below:-

    Code:-

    az aks create --resource-group myResourceGroup --name myAKSCluster --node-count 2 --enable-addons monitoring --generate-ssh-keys --windows-admin-username siliconuser --vm-set-type VirtualMachineScaleSets --network-plugin azure
    

    Make sure you note down the Kubernetes version in my scenario its 1.24.9

    Output:-
    enter image description here

    Now, I used the same version in adding aks node pool with custom header with windows profile and it got executed successfully like below:-

    Code:-

    az aks nodepool add --resource-group myResourceGroup --cluster-name myAKSCluster --os-type Windows --name npwcd --node-vm-size Standard_D4s_v3 --kubernetes-version 1.24.9 --aks-custom-headers WindowsContainerRuntime=containerd --node-count 1
    

    Output:-

    enter image description here

    Portal:-

    enter image description here

    enter image description here

    Reference:-

    az aks nodepool add – unrecognized arguments: –aks-custom-headers EnableUltraSSD=true · Issue #16017 · Azure/azure-cli · GitHub

    azure-docs/quick-windows-container-deploy-cli.md at main · MicrosoftDocs/azure-docs · GitHub

    Login or Signup to reply.
  2. Most likely the az cli needs to be updated to the latest version. However, note that even if you don’t specify the custom header, since this is above K8s 1.20, the Windows node pool will have containerd as the runtime.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search