v8

latestOpenAPI 3.0.0Apache 2.0raw.githubusercontent.com2025-10-165266542.4 MB
DigitalOcean-public.v2-new_Kubernetes

Add a Node Pool to a Kubernetes Cluster

To add an additional node pool to a Kubernetes clusters, send a POST request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID/node_pools with the following attributes.

post/v2/kubernetes/clusters/{cluster_id}/node_pools

Path parameters

cluster_idstring uuid required

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

Request body

sizestring required

The slug identifier for the type of Droplet used as workers in the node pool.

idstring uuid

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

namestring required

A human-readable name for the node pool.

countinteger required

The number of Droplet instances in the node pool.

tagsstring[]

An array containing the tags applied to the node pool. All node pools are automatically tagged k8s, k8s-worker, and k8s:$K8S_CLUSTER_ID. <br><br>Requires tag:read scope.

labelsobject nullable

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.

auto_scaleboolean

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

min_nodesinteger

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.

max_nodesinteger

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.

Example request

{
  "size": "s-1vcpu-2gb",
  "id": "cdda885e-7663-40c8-bc74-3a036c66545d",
  "name": "frontend-pool",
  "count": 3,
  "tags": [
    "k8s",
    "k8s:bd5f5959-5e1e-4205-a714-a914373942af",
    "k8s-worker",
    "production",
    "web-team"
  ],
  "taints": [
    {
      "key": "priority",
      "value": "high",
      "effect": "NoSchedule"
    }
  ],
  "auto_scale": true,
  "min_nodes": 3,
  "max_nodes": 6,
  "nodes": [
    {
      "id": "e78247f8-b1bb-4f7a-8db9-2a5f8d4b8f8f",
      "name": "adoring-newton-3niq",
      "status": {
        "state": "provisioning"
      },
      "droplet_id": "205545370",
      "created_at": "2018-11-15T16:00:11Z",
      "updated_at": "2018-11-15T16:00:11Z"
    }
  ]
}

Response

The response will be a JSON object with a key called node_pool. The value of this will be an object containing the standard attributes of a node pool.

Example response

{
  "node_pool": {
    "id": "cdda885e-7663-40c8-bc74-3a036c66545d",
    "name": "new-pool",
    "size": "s-1vcpu-2gb",
    "count": 3,
    "tags": [
      "production",
      "web-team",
      "front-end",
      "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": " ",
        "status": {
          "state": "provisioning"
        },
        "droplet_id": " ",
        "created_at": "2018-11-15T16:00:11Z",
        "updated_at": "2018-11-15T16:00:11Z"
      },
      {
        "id": "ad12e744-c2a9-473d-8aa9-be5680500eb1",
        "name": " ",
        "status": {
          "state": "provisioning"
        },
        "droplet_id": " ",
        "created_at": "2018-11-15T16:00:11Z",
        "updated_at": "2018-11-15T16:00:11Z"
      },
      {
        "id": "e46e8d07-f58f-4ff1-9737-97246364400e",
        "name": " ",
        "status": {
          "state": "provisioning"
        },
        "droplet_id": " ",
        "created_at": "2018-11-15T16:00:11Z",
        "updated_at": "2018-11-15T16:00:11Z"
      }
    ]
  }
}