dots.v2.kubernetes.clusters.byCluster_id().node_pools.byNode_pool_id().put()

Generated on 5 Nov 2026 from DoTs version v1.23.0

Usage

client.v2.kubernetes.clusters.byCluster_id(cluster_id).node_pools.byNode_pool_id(node_pool_id).put(body: Kubernetes_node_pool_update, requestConfiguration?: RequestConfiguration<object>): Promise<undefined | WithNode_pool_PutResponse>

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/{cluster_id}/node_pools/{node_pool_id} with the following attributes.

Parameters

Path Parameters

cluster_id string required

Example: bd5f5959-5e1e-4205-a714-a914373942af

A unique ID that can be used to reference a Kubernetes cluster.

Min: 1

node_pool_id string required

Example: cdda885e-7663-40c8-bc74-3a036c66545d

A unique ID that can be used to reference a Kubernetes node pool.

Min: 1

Request Body

id string optional read-only

Example: cdda885e-7663-40c8-bc74-3a036c66545d

A unique ID that can be used to identify and reference a specific node pool.

name string required

Example: frontend-pool

A human-readable name for the node pool.

count integer required

Example: 3

The number of Droplet instances in the node pool.

tags array of strings optional

Example: ["k8s", "k8s:bd5f5959-5e1e-4205-a714-a914373942af", "k8s-worker", "production", "web-team"]

An array containing the tags applied to the node pool. All node pools are automatically tagged k8s, k8s-worker, and k8s:$K8S_CLUSTER_ID.

Requires tag:read scope.

labels object or null optional

An object of key/value mappings specifying labels to apply to all nodes in a pool. Labels will automatically be applied to all existing nodes and any subsequent nodes added to the pool. Note that when a label is removed, it is not deleted from the nodes in the pool.

taints array of objects optional

An array of taints to apply to all nodes in a pool. Taints will automatically be applied to all existing nodes and any subsequent nodes added to the pool. When a taint is removed, it is deleted from all nodes in the pool.

Show child properties
key string optional

Example: priority

An arbitrary string. The key and value fields of the taint object form a key-value pair. For example, if the value of the key field is "special" and the value of the value field is "gpu", the key value pair would be special=gpu.

value string optional

Example: high

An arbitrary string. The key and value fields of the taint object form a key-value pair. For example, if the value of the key field is "special" and the value of the value field is "gpu", the key value pair would be special=gpu.

effect string optional

How the node reacts to pods that it won't tolerate. Available effect values are NoSchedule, PreferNoSchedule, and NoExecute.

One of: NoSchedule, PreferNoSchedule, NoExecute

autoScale boolean optional

Example: true

A boolean value indicating whether auto-scaling is enabled for this node pool.

minNodes integer optional

Example: 3

The minimum number of nodes that this node pool can be auto-scaled to. The value will be 0 if auto_scale is set to false.

maxNodes integer optional

Example: 6

The maximum number of nodes that this node pool can be auto-scaled to. The value will be 0 if auto_scale is set to false.

nodes array of objects optional read-only

An object specifying the details of a specific worker node in a node pool.

Show child properties
id string optional

Example: e78247f8-b1bb-4f7a-8db9-2a5f8d4b8f8f

A unique ID that can be used to identify and reference the node.

name string optional

Example: adoring-newton-3niq

An automatically generated, human-readable name for the node.

status object optional

An object containing a state attribute whose value is set to a string indicating the current status of the node.

Show child properties
state string optional

A string indicating the current status of the node.

One of: provisioning, running, draining, deleting

dropletId string optional

Example: 205545370

The ID of the Droplet used for the worker node.

createdAt string optional

Example: 2018-11-15T16:00:11Z

A time value given in ISO8601 combined date and time format that represents when the node was created.

updatedAt string optional

Example: 2018-11-15T16:00:11Z

A time value given in ISO8601 combined date and time format that represents when the node was last updated.

Request Sample

Show Request Sample
import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
    createDigitalOceanClient,
    DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";

const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);

const response = await client.v2.kubernetes.clusters
    .byCluster_id("bd5f5959-5e1e-4205-a714-a914373942af").node_pools
    .byNode_pool_id("cdda885e-7663-40c8-bc74-3a036c66545d").put({
    name: "frontend-pool",
    count: 3,
    tags: [
        "k8s",
        "k8s:bd5f5959-5e1e-4205-a714-a914373942af",
        "k8s-worker",
        "production",
        "web-team",
    ],
    taints: [],
    autoScale: true,
    minNodes: 3,
    maxNodes: 6,
});

Response Example

Show Response Example
{
  "node_pool": {
    "id": "cdda885e-7663-40c8-bc74-3a036c66545d",
    "name": "renamed-pool",
    "size": "s-1vcpu-2gb",
    "count": 3,
    "tags": [
      "production",
      "web-team",
      "front-end",
      "new-tag",
      "k8s",
      "k8s:bd5f5959-5e1e-4205-a714-a914373942af",
      "k8s:worker"
    ],
    "labels": null,
    "taints": [],
    "auto_scale": true,
    "min_nodes": 3,
    "max_nodes": 6,
    "nodes": [
      {
        "id": "478247f8-b1bb-4f7a-8db9-2a5f8d4b8f8f",
        "name": "adoring-newton-3niq",
        "status": {
          "state": "running"
        },
        "droplet_id": "205545370",
        "created_at": "2018-11-15T16:00:11Z",
        "updated_at": "2018-11-15T16:00:11Z"
      },
      {
        "id": "ad12e744-c2a9-473d-8aa9-be5680500eb1",
        "name": "adoring-newton-3nim",
        "status": {
          "state": "running"
        },
        "droplet_id": "205545371",
        "created_at": "2018-11-15T16:00:11Z",
        "updated_at": "2018-11-15T16:00:11Z"
      },
      {
        "id": "e46e8d07-f58f-4ff1-9737-97246364400e",
        "name": "adoring-newton-3ni7",
        "status": {
          "state": "running"
        },
        "droplet_id": "205545372",
        "created_at": "2018-11-15T16:00:11Z",
        "updated_at": "2018-11-15T16:00:11Z"
      }
    ]
  }
}

More Information

See /v2/kubernetes/clusters/{cluster_id}/node_pools/{node_pool_id} in the API reference for 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.