pydo.kubernetes.update_node_pool()

Generated on 18 Jun 2025 from pydo version v0.11.0

Description

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.

Parameters

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

Request Sample

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)

More Information

See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.