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
2
Answers
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
Installed aks-preview extension in my cli like below:-
Code:-
Output:-
Created aks cluster with Admin username and password for aks custom header windows profile to work like below:-
Code:-
Make sure you note down the Kubernetes version in my scenario its 1.24.9
Output:-
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:-
Output:-
Portal:-
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
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.