Running az 2.0.68 with aks-preview 0.4.5.
az aks create step fails with a validation error for the Windows admin password:
validation error: Parameter 'ManagedClusterWindowsProfile.admin_password' must conform to the following pattern: '^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\\^&\\*\\(\\)])[a-zA-Z\\d!@#$%\\^&\\*\\(\\)]{12,123}$'.
The doc say that if this happens, to try again with a new RG in a new region, but that doesn't work for me. I've tried multiple RGs in East and West US and West Europe, using ever more complex passwords, and I get this error every time.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Hi @sixeyed Thank you for your feedback! We will review and provide an update as appropriate.
I got the same but fixed it by changing the password to a new one that uses only allowed characters and then everything worked!
@sixeyed
Can you set a password with the below constraints and let me know.
These requirements apply for the windows virtual machines.
@asicoe I hope your password satisfied the above requirements. Let me know
Tried few minutes ago with different password combinations but none of them matched!
Tried even with example from Microsoft sample, "P@ssw0rd1234!".
It has one lower case character, it has one uppercase character, it has 1 number, it has 1 special character, it is longer than 12 and lower than 72.
Still not working!
@andreivirgiltudor
can you give me the command which you tried and the error which you got
First I've issued
$windowsPassword = "RES4Ever!"
$windowsUser = "WindowsMaster"
az aks create --resource-group k8s-win --name k8s-win-test --node-count 1 --enable-addons monitoring --kubernetes-version 1.14.0 --generate-ssh-keys --windows-admin-username $windowsUser --windows-admin-password $windowsPassword --enable-vmss --networ
k-plugin azure
Which had this output:
The behavior of this command has been altered by the following extension: aks-preview
Finished service principal creation[##################################] 100.0000%validation error: Parameter 'ManagedClusterWindowsProfile.admin_password' must conform to the following pattern: '^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\\^&\\*\\(\\)])[a-zA-Z\\d!@#$%\\^&\\*\\(\\)]{12,123}$'
So I ran this command (first password did not match length requirement):
$windowsPassword = "P@ssw0rd1234"
az aks create --resource-group k8s-win --name k8s-win-test --node-count 1 --enable-addons monitoring --kubernetes-version 1.14.0 --generate-ssh-keys --windows-admin-username $windowsUser --windows-admin-password $windowsPassword --enable-vmss --networ
k-plugin azure
The behavior of this command has been altered by the following extension: aks-preview
validation error: Parameter 'ManagedClusterWindowsProfile.admin_password' must conform to the following pattern: '^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\\^&\\*\\(\\)])[a-zA-Z\\d!@#$%\\^&\\*\\(\\)]{12,123}$'
So I've decided to find a matching password on REGEX101 against regular expression from error message! Got no match.
Few minutes ago I've isseud again:
$windowsPassword = "P@ssw0rd1234!"
az aks create --resource-group k8s-win --name k8s-win-test --node-count 1 --enable-addons monitoring --kubernetes-version 1.14.0 --generate-ssh-keys --windows-admin-username $windowsUser --windows-admin-password $windowsPassword --enable-vmss --networ
k-plugin azure
The cluster is now created!
I can't find reason why it failed before!
ok. If you face the issue again please open a new issue and then we will troubleshoot.
Most helpful comment
First I've issued
Which had this output:
So I ran this command (first password did not match length requirement):
So I've decided to find a matching password on REGEX101 against regular expression from error message! Got no match.
Few minutes ago I've isseud again:
The cluster is now created!
I can't find reason why it failed before!