Skip to content

Resize or Autoscale Node Pool

PUT
/tenant_clusters/{tenant_cluster_id}/node-pools/{node_pool_id}/autoscaling/
curl --request PUT \
--url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/tenant_clusters/{tenant_cluster_id}/node-pools/{node_pool_id}/autoscaling/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"min_replicas": 0,
"max_replicas": 0,
"triggers": [
{
"type": "cpu",
"target_utilization_percent": 0
}
],
"polling_interval_seconds": 0,
"scale_up_stabilization_window_seconds": 0,
"scale_down_stabilization_window_seconds": 0
}'

Sets a worker pool’s size, in place of whatever it had. Send equal min_replicas and max_replicas and no triggers for a fixed size: the pool shows resizing until it reaches that count. Send a lower minimum than maximum, with a CPU target, a memory target, or both, to autoscale: the pool runs as many nodes as its busiest target asks for, within the bounds, and shows scaling while its autoscaler changes the count. The cluster stays ready throughout.

The pool must be ready and on an hourly plan; a committed pool cannot be resized or autoscaled. Growing a pool checks credit and free stock for the added nodes. Scaling down removes nodes and evicts their pods.

tenant_cluster_id
required
integer

Kubernetes cluster ID, as returned by List Kubernetes Clusters.

node_pool_id
required
integer

Worker node pool ID, from the cluster’s node_pools list.

project_id
required
integer

Project ID

active_iam
integer

Active IAM ID (To access contact person account) Find your Active IAM ID here

location
required
string
Allowed values: Delhi Chennai

Location

Media typeapplication/json
object
min_replicas
required

The fewest nodes. Equal to max_replicas for a fixed size.

integer
>= 1 <= 25
max_replicas
required

The most nodes.

integer
>= 1 <= 25
triggers

Required when autoscaling, and empty or left out for a fixed size. At most one cpu and one memory target.

Array<object>
<= 2 items
object
type
required
string
Allowed values: cpu memory
target_utilization_percent

The average use across the pool’s nodes to aim for. Defaults to 70 for cpu and 80 for memory.

integer
>= 20 <= 90
polling_interval_seconds

How often the targets are checked, when autoscaling. null keeps the default, 30.

integer
nullable >= 15 <= 300
scale_up_stabilization_window_seconds

How long use must stay above the target before nodes are added, when autoscaling. null keeps the default, 0.

integer
nullable <= 3600
scale_down_stabilization_window_seconds

How long use must stay below the target before nodes are removed, when autoscaling. null keeps the default, 300.

integer
nullable <= 3600

The new size is saved.

Media typeapplication/json
object
code
integer
data

The pool’s size settings, as in Get Node Pool Size, without available_trigger_types.

object
node_pool_id
integer
min_replicas
integer
max_replicas
integer
replicas
integer
status
string
errors
object
message
string

Example

{
"code": 200,
"data": {
"node_pool_id": 22,
"min_replicas": 4,
"max_replicas": 4,
"replicas": 4,
"status": "resizing"
},
"errors": {},
"message": "Node pool resize to 4 nodes queued successfully"
}