To update the name of a node pool, edit the tags applied to it, or adjust its
number of nodes, send a PUT request to
/v2/kubernetes/clusters/$K8S_CLUSTER_ID/node_pools/$NODE_POOL_ID
with the
following attributes.
Name | Type | Required | Description | Default Value |
---|---|---|---|---|
cluster_id |
string | True | A unique ID that can be used to reference a Kubernetes cluster. | |
node_pool_id |
string | True | A unique ID that can be used to reference a Kubernetes node pool. | |
body |
JSON or IO[bytes] | True |
import os
from pydo import Client
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
req = {
"name": "frontend-pool",
"count": 3,
"tags": [
"k8s",
"k8s:bd5f5959-5e1e-4205-a714-a914373942af",
"k8s-worker",
"production",
"web-team"
],
"labels": None,
"taints": [
{
"key": "priority",
"value": "high",
"effect": "NoSchedule"
}
],
"auto_scale": True,
"min_nodes": 3,
"max_nodes": 6
}
resp = client.kubernetes.update_node_pool(cluster_id="1fd32a", node_pool_id="392fa3a", body=req)
See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.