[BUG] AKS deployment incorrectly allows you to downgrade the kubernetesVersion property
Describe the bug Deploy an AKS cluster with latest release, we will use 1.24.9 in this scenario. If you then run a second deployment and pass in a lower kubernetesVersion value the deployment will succeed but it really doesn't.
The Portal and Resource Manager for microsoft.containerservice/managedclusters is showing the kubernetesVersion as 1.23.15, or whatever lower version you provided. But the currentKubernetesVersion and kubectl shows it running 1.24.9.
To Reproduce Steps to reproduce the behavior:
- Run deployment with kubernetesVersion set to 1.24.9
- Run deployment again with kubernetesVersion set to 1.23.15
Expected behavior An error that shows downgrading is not supported.
Screenshots


Environment (please complete the following information):
- CLI Version N/A
- Kubernetes version N/A
- CLI Extension version N/A
- Browser N/A
Additional context If a deployment is performed where we set the upgrade profile of the cluster to do patch channel then AKS takes care of automatically upgrading the control plane and the nodes for us (or it should as documented).
The fact that our deployment having an older value in version control and the API allowing us to pass in an older value even though an upgrade was performed means we have to now do pre-deployment checks to validate the version we are passing in won't cause the metadata to be out of sync.
Action required from @Azure/aks-pm
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Hi @wsmelton, I cannot reproduce this issue, when I recreate the same AKS cluster with a lower version, I got the error message like, "ERROR: The cluster 'myAKSCluster' under resource group 'myRG' already exists.". Please let me know if you still see this issue in your environment?
This issue will now be closed because it hasn't had any activity for 7 days after stale. wsmelton feel free to comment again on the next 7 days to reopen or open a new issue after that time if you still have a question/issue or suggestion.