For me its working as expected
az aks create --resource-group myResourceGroup --name myAKSCluster --node-count 2 --generate-ssh-keys
SSH key files 'C:\Users\<>.ssh\id_rsa' and 'C:\Users\<>.ssh\id_rsa.pub' have been generated under ~/.ssh to allow SSH access to the VM. If using machines without permanent storage like Azure Cloud Shell without an attached file share, back up your keys to a safe location
- Running ..
Can you check the resource group exists before creating the cluster