Node Autoscaling¶
Kubernetes Nodes Autoscaler or Cluster Autoscaler automatically adds or removes nodes in a cluster based on the resources requested by pods in that cluster..
When you request a new Caascad environment, you specify whether or not you want to enable node autoscaling. If you want to enable autoscaling, you also specify the minimum number of nodes, minNodes, the maximum number of nodes, maxNodes, and the number of nodes that should be created by default when initializing the cluster, desiredNodes.
Note
You can ask the Caascad Support to change these settings throughout the life cycle of your environment.
Flexible Engine: CCE settings¶
Nodepools and Availability Zones¶
One nodepool per AZ must be created in order to use the Nodes Autoscaler across multiple Availability Zones (AZ) and to ensure autoscaling on the expected AZ.
Example
If you want to create an environment available on AZ a, b and c, with a minimum number of 3 nodes and a maximum number of 9 nodes.
On Flexible Engine, you will get:
- 1 nodepool on the AZ a with a minimum of 1 node and a maximum of 3 nodes
- 1 nodepool on the AZ b with a minimum of 1 node and a maximum of 3 nodes
- 1 nodepool on the AZ c with a minimum of 1 node and a maximum of 3 nodes
Upscale and downscale: default settings¶
The default settings for the Flexible Engine CCE Autoscaler in the Caascad environments are presented below:
- Auto scale-in | scaleUpUtilizationEnabled: true
enable upscaling on resource usage - auto scale-out | scaleUpUnscheduledPodEnabled: true
enable upscaling on event pod in pending status - Idle Time | IdleTime : 5
time in minutes that a node must remain inactive before being removed from the cluster - Resource Usage | scaleDownUtilizationThreshold : 0,5
resource usage that a node must reach before it can be removed from the cluster. Value between 0 and 1 - Scale-in Cooldown After Scale-out | scaleDownDelayAfterAdd : 10
time in minutes after a node is added, before the downscale evaluation is restarted - Scale-in Cooldown After Node Deletion | scaleDownDelayAfterDelete : 10
time in minutes after a node is deleted before the downscale evaluation is restarted - Scale-in Cooldown After Failure | scaleDownDelayAfterFailure : 3
time in minutes after a node deletion failure, before the downscale is restarted - Max empty bulk delete | maxEmptyBulkDeleteFlag : 10
maximum number of empty nodes that can be deleted at the same time - Node Recheck Timeout | unremovableNodeRecheckTimeout : 5
time in minutes before the autoscaler rechecks nodes that could not be removed previously
For more information on CCE autoscaler settings, see the Flexible Engine documentation.
How to test and modify autoscaler settings¶
You can change the default settings of the CCE autoscaler in the Flexible Engine console to perform your tests.
To do this, log into one of your non-production environments on Flexible Engine console and go to CCE > Add ons > Parameters.
From the WebUI, you can modify on CCE autoscaler settings and observe the result in your non-production environment.
Important
Once you have completed your adjustments and defined your parameters, contact Caascad Support to request thoses changes to be applied to the environment(s) of your choice.