Skip to content

Edit a Node Pool (Autoscaling)

PUT
/api/v1/kubernetes/update-node-pool/{node_pool_id}/
curl --request PUT \
--url 'https://api.e2enetworks.com/myaccount/api/v1/kubernetes/update-node-pool/{node_pool_id}/?project_id=<PROJECT_ID>&apikey=<API_KEY>&location=<LOCATION>' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"min_vms": 3,
"cardinality": 3,
"max_vms": 5,
"policy_type": "Default",
"plan_id": 1088,
"elasticity_policies": [
{
"type": "CHANGE",
"adjust": 1,
"parameter": "CPU",
"operator": ">",
"value": 60,
"period_number": 3,
"period": 10,
"cooldown": 150
},
{
"type": "CHANGE",
"adjust": -1,
"parameter": "CPU",
"operator": "<",
"value": 30,
"period_number": 3,
"period": 10,
"cooldown": 150
}
],
"scheduled_policies": []
}'

Updates a node pool’s scaling configuration: its min_vms / cardinality / max_vms, policy_type, backing plan_id, and the elastic (elasticity_policies) and scheduled (scheduled_policies) rules. The requested cardinality must lie within [min_vms, max_vms]. Use the node pool’s service_id (from List Node Pools).

node_pool_id
required
integer

The node pool service_id (from List Node Pools).

Example

12346
project_id
required
integer

Identifier of the project to scope the request to. Required integer project ID.

Example

<PROJECT_ID>
apikey
required
string

API key used to authenticate the update request.

Example

<API_KEY>
location
required
string

Region of the cluster.

Example

<LOCATION>
Media typeapplication/json

Update a node pool’s sizing and scaling policies.

object
min_vms
required

Minimum number of worker nodes.

integer

Example

3
cardinality
required

Desired (current) number of worker nodes.

integer

Example

3
max_vms
required

Maximum number of worker nodes.

integer

Example

5
policy_type
required

Scaling policy mode.

string

Example

Default
plan_id
required

SKU ID of the worker plan backing the pool.

integer

Example

1088
elasticity_policies

Elastic scaling rules (scale-up adjust 1 and scale-down adjust -1).

Array<object>
object
type
string

Example

CHANGE
adjust
integer

Example

1
parameter
string

Example

CPU
operator
string

Example

>
value
integer

Example

60
period_number
integer

Example

3
period
integer

Example

10
cooldown
integer

Example

150
scheduled_policies

Scheduled scaling rules. Empty when the pool uses only elastic scaling.

Array<object>
object
type
string

Example

CARDINALITY
adjust
integer

Example

3
recurrence
string

Example

0 12 * * *

Example

{
"min_vms": 3,
"cardinality": 3,
"max_vms": 5,
"policy_type": "Default",
"plan_id": 1088,
"elasticity_policies": [
{
"type": "CHANGE",
"adjust": 1,
"parameter": "CPU",
"operator": ">",
"value": 60,
"period_number": 3,
"period": 10,
"cooldown": 150
},
{
"type": "CHANGE",
"adjust": -1,
"parameter": "CPU",
"operator": "<",
"value": 30,
"period_number": 3,
"period": 10,
"cooldown": 150
}
],
"scheduled_policies": []
}

Successful response

Media typeapplication/json
object
code
integer
data
object
errors
object
message
string

Example

{
"code": 200,
"message": "Node Pool pool-worker-1 Updated Successfully"
}