AKS cluster creation fails with error 'Security rule has invalid Port range'

1/14/2021

We are creating an AKS cluster, but it fails at the deployment stage with the below error,

'Security rule has invalid Port range. Value provided: 22,3389. Value should be an integer OR integer range with '-' delimiter. Valid range 0-65535.. Details: [] (Code: SecurityRuleInvalidPortRange)'

We tried using both UI and CLI, but it fails. Please let me know if somebody is aware of this issue.

Thanks, Arun

-- Arun
azure-aks
azure-devops
kubernetes

1 Answer

1/14/2021

Problem you have mentioned is clear and says that you have defined wrong port number - 223389. While port range is 0-65535.

Probably you wanted to set up destination_port ranges- it should look like: destination_port_ranges = ["22", "3389"]

Similar problem: invalid-port-range-aks.

-- Malgorzata
Source: StackOverflow