Reputation: 131
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
Upvotes: 0
Views: 613
Reputation: 449
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.
Upvotes: 0
Reputation: 8195
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
Installed aks-preview extension in my cli like below:-
Code:-
az extension add --name aks-preview
Output:-
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:-
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:-
Portal:-
Reference:-
azure-docs/quick-windows-container-deploy-cli.md at main · MicrosoftDocs/azure-docs · GitHub
Upvotes: 0