AKS icon indicating copy to clipboard operation
AKS copied to clipboard

Increase minimum node count while autoscaling is enabled

Open PSanetra opened this issue 6 years ago • 7 comments

I want to increase the minimum node count of a node pool while it is in autoscaling mode. The Azure Portal is showing the error message The current node count must be included in the autoscaling range. when you try to do this.

Currently you would need to disable node autoscaling, increase the current node count manually and enable autoscaling again.

This behavior makes it hard to automate increasing the minimum node count with tools like terraform.

PSanetra avatar Jul 31 '20 12:07 PSanetra

Triage required from @Azure/aks-pm

ghost avatar Jul 31 '20 12:07 ghost

This check has been remove from the CLI and should be unblocked in ARM and Terraform.

I think portal might still be doing the validation.

marwanad avatar Aug 01 '20 19:08 marwanad

@marwanad I tried below two scenarios in Terraform but still getting the error. Please correct me if I am missing anything

  1. Tried increasing both node_count and min_count Error: cannot change node_count when enable_auto_scaling is set to true

  2. Tried increasing only min_count Error: node_count(1) must be equal to or greater than min_count(2) when enable_auto_scaling is set to true

sudeep1607 avatar Aug 04 '20 15:08 sudeep1607

This extra validation seems to be coming from the Terraform side.

https://github.com/terraform-providers/terraform-provider-azurerm/blob/277f16cdb3cd9916fe1b1b56e58f9dc4bb55af37/azurerm/internal/services/containers/kubernetes_nodepool.go#L260-L265

Might be worth opening an issue there regarding (2).

For (1), this is by design because AKS will ignore the specified node count if autoscaler is on. We'll evaluate if that scenario should be unblocked.

marwanad avatar Aug 04 '20 17:08 marwanad

@palma21, @jenetlan would you be able to assist?

ghost avatar Aug 19 '20 06:08 ghost

Thank you for reporting this and I apologize for the inconvenience. I can confirm that we're being overly restrictive on portal and we'll work to fix that. The ETA I have for the fix is before the end of September. Thanks!

jenetlan avatar Aug 25 '20 04:08 jenetlan

And good news! This should now be fixed and fully rolled out. Thanks for your patience, and let me know if you run into any other issues here!

jenetlan avatar Sep 10 '20 04:09 jenetlan