Skip to content

Conversation

@PramodValavala-MSFT
Copy link
Contributor

@PramodValavala-MSFT PramodValavala-MSFT commented May 14, 2022

Related command

az aks nodepool add
az aks nodepool update

Description

This PR address 2 changes

  • Node Pools can be scaled from 0 to 1000 nodes from the Azure Portal, but the CLI has a check restricting them between 1 and 100
  • Only User Node Pools support scaling to 0 nodes, which after the fix for the acceptable range above, results in unintuitive error messages from the ARM endpoint

After the fix for the first, the following commands were tested, resulting in errors from ARM as below

# Creating a System Node Pool with Min Count set to 0 and Node Count set to 0
$ az aks nodepool add --name {} --cluster-name {} --resource-group {} --enable-cluster-autoscaler --node-count 0 --min-count 0 --max-count 1 --mode System
(InvalidParameter) The value of parameter agentPoolProfile.count is invalid. Please see https://aka.ms/aks-naming-rules for more details.
Code: InvalidParameter
Message: The value of parameter agentPoolProfile.count is invalid. Please see https://aka.ms/aks-naming-rules for more details.
Target: agentPoolProfile.count

# Creating a System Node Pool with Min Count set to 0 and Node Count set to 1
$ az aks nodepool add --name {} --cluster-name {} --resource-group {} --enable-cluster-autoscaler --node-count 1 --min-count 0 --max-count 1 --mode System
(InvalidParameter) The value of parameter agentPoolProfile.minCount is invalid. Please see https://aka.ms/aks-naming-rules for more details.
Code: InvalidParameter
Message: The value of parameter agentPoolProfile.minCount is invalid. Please see https://aka.ms/aks-naming-rules for more details.
Target: agentPoolProfile.minCount

# Updating a System Node Pool to have Min Count set to 0
$ az aks nodepool update --name {} --cluster-name {} --resource-group {} --update-cluster-autoscaler --min-count 0 --max-count 1
(InvalidParameter) The value of parameter agentPoolProfile.minCount is invalid. Please see https://aka.ms/aks-naming-rules for more details.
Code: InvalidParameter
Message: The value of parameter agentPoolProfile.minCount is invalid. Please see https://aka.ms/aks-naming-rules for more details.
Target: agentPoolProfile.minCount

# Updating a User Node Pool to a System Node Pool with Min Count set to 0
$ az aks nodepool update --name {} --cluster-name {} --resource-group {} --update-cluster-autoscaler --min-count 0 --max-count 1 --mode System
(InvalidParameter) The value of parameter agentPoolProfile.minCount is invalid. Please see https://aka.ms/aks-naming-rules for more details.
Code: InvalidParameter
Message: The value of parameter agentPoolProfile.minCount is invalid. Please see https://aka.ms/aks-naming-rules for more details.
Target: agentPoolProfile.minCount

With the other set of changes in this PR, all of the above commands will result in the following error instead

Value of min-count should be greater than or equal to 1 for System node pools

resolves #22032
resolves #22438

Testing Guide

Run the commands mentioned above


This checklist is used to make sure that common guidelines for a pull request are followed.

@ghost ghost requested a review from wangzelin007 May 14, 2022 06:22
@ghost ghost assigned zhoxing-ms May 14, 2022
@ghost ghost added this to the May 2022 (2022-05-24) - For Build milestone May 14, 2022
@ghost ghost added the Auto-Assign Auto assign by bot label May 14, 2022
@ghost ghost requested a review from yonzhan May 14, 2022 06:22
@ghost ghost added the AKS az aks/acs/openshift label May 14, 2022
@ghost ghost assigned jsntcy May 14, 2022
@ghost ghost added the Portal az portal label May 14, 2022
@yonzhan
Copy link
Collaborator

yonzhan commented May 14, 2022

AKS

@andyliuliming
Copy link
Member

will approve this after @FumingZhang add one more live test case.

@yonzhan yonzhan removed the Portal az portal label May 15, 2022
@FumingZhang
Copy link
Member

Here's the PR #22451 to add live test cases. Will update recordings after this PR is merged.

@zhoxing-ms
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@zhoxing-ms zhoxing-ms merged commit 5300915 into Azure:dev May 16, 2022
@PramodValavala-MSFT PramodValavala-MSFT added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AKS az aks/acs/openshift Auto-Assign Auto assign by bot bug This issue requires a change to an existing behavior in the product in order to be resolved.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

az aks nodepool add --max-count range should be 1, 1000 az aks nodepool update --min-count cannot be 0 after az cli update

6 participants