Azure-cli: az aks create -g RG -n AKS --node-count 2 --generate-ssh-keys : Error - The password must contain at least 1 special character. paramName: PasswordCredentials, paramValue:

Created on 7 Mar 2019  路  4Comments  路  Source: Azure/azure-cli

Following this article to create an AKS cluster in Azure CLI
https://docs.microsoft.com/en-us/cli/azure/aks?view=azure-cli-latest#az-aks-create

az aks create -g MyResourceGroup -n MyManagedCluster --node-count 2
An RSA key file or key value must be supplied to SSH Key Value. You can use --generate-ssh-keys to let CLI generate one for you

az aks create -g MyResourceGroup -n MyManagedCluster --node-count 2 --generate-ssh-keys
The password must contain at least 1 special character. paramName: PasswordCredentials, paramValue: , objectType: Microsoft.Online.DirectoryServices.Application

az --version
azure-cli 2.0.59
....
....
Python location 'C:Program Files (x86)Microsoft SDKsAzureCLI2python.exe'
Extensions directory 'C:Userssharsha.azurecliextensions'
Python (Windows) 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 02:47:15) [MSC v.1900 32 bit (Intel)]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.

I get the same error using cloud shell on Azure Portal as well.

AKS bug

Most helpful comment

Please try the below work around -

Create a new SP :
az ad sp create-for-rbac --skip-assignment

Create AKS cluster by providing credentials created above :
az aks create --name AKS --resource-group RG --node-count Int --generate-ssh-keys --service-principal AppID --client-secret Pwd

All 4 comments

I am also getting the same error when using the Azure Cloud Shell
az aks create -l eastus -n testCluster -g volunteer --generate-ssh-keys -k 1.12.4 -c 1.
I was following the tutorial here: https://cloudblogs.microsoft.com/opensource/2018/11/27/tutorial-azure-devops-setup-cicd-pipeline-kubernetes-docker-helm/

Please try the below work around -

Create a new SP :
az ad sp create-for-rbac --skip-assignment

Create AKS cluster by providing credentials created above :
az aks create --name AKS --resource-group RG --node-count Int --generate-ssh-keys --service-principal AppID --client-secret Pwd

When I try the workaround, I get this error:

The request did not have a subscription or a valid tenant level resource provider.

Confirmed that az account show lists the correct subscription. Adding the subscriptionId parameter or the aad-tenant-id parameter had no effect.

(CLI version 2.0.60, Ubuntu 18.04)

@yugangw-msft
I am still getting this issue running the command in cloudshell
az aks create --resource-group $group --name $aksname --node-count 3 --generate-ssh-keys --disable-rbac --node-vm-size $vmsize --kubernetes-version 1.12.6

Error:
The password must contain at least 1 special character. paramName: PasswordCredentials, paramValue: , objectType: Microsoft.Online.DirectoryServices.Application

Was this page helpful?
0 / 5 - 0 ratings