kubernetes_node_pool

Generated on 13 Feb 2026 from digitalocean.cloud version v1.2.1

Synopsis

Create, update, or delete node pools in a Kubernetes cluster. Node pools allow you to create groups of worker nodes with different configurations within a single Kubernetes cluster. View the API documentation at https://docs.digitalocean.com/reference/api/api-reference/#tag/Kubernetes.

Requirements

  • pydo >= 0.1.3
  • azure-core >= 1.26.1

Parameters

Parameter Choices / Default Description
auto_scale
bool
Enable auto-scaling for the node pool.
client_override_options
dict
Client override options (developer use). For example, can be used to override the DigitalOcean API endpoint for an internal test suite. If provided, these options will knock out existing options.
cluster_id
str / required
The UUID of the Kubernetes cluster.
count
int
The number of Droplet instances in the node pool.
id
str
The unique identifier of the node pool. Used for lookup when updating or deleting.
labels
dict
An object of key/value mappings specifying labels to apply to nodes.
max_nodes
int
Maximum number of nodes for auto-scaling.
min_nodes
int
Minimum number of nodes for auto-scaling.
module_override_options
dict
Module override options (developer use). Can be used to override module options to support experimental or future options. If provided, these options will knock out existing options.
name
str / required
The name of the node pool.
size
str
The slug identifier for the size of the nodes.
state
str
Choices:
  • present (default)
  • absent
State of the resource, present to create, absent to destroy.
tags
list / elements=str
An array of tags to apply to the node pool.
taints
list / elements=dict
An array of taints to apply to nodes in the pool.
timeout
int
Default: 300 Polling timeout in seconds.
token
str
DigitalOcean API token. There are several environment variables which can be used to provide this value. DIGITALOCEAN_ACCESS_TOKEN, DIGITALOCEAN_TOKEN, DO_API_TOKEN, DO_API_KEY, DO_OAUTH_TOKEN and OAUTH_TOKEN

Examples

- name: Create Kubernetes node pool
  digitalocean.cloud.kubernetes_node_pool:
    token: "{{ token }}"
    state: present
    cluster_id: bd5f5959-5e1e-4205-a714-a914373942af
    name: worker-pool
    size: s-2vcpu-4gb
    count: 3
    tags:
      - production

- name: Create auto-scaling node pool
  digitalocean.cloud.kubernetes_node_pool:
    token: "{{ token }}"
    state: present
    cluster_id: bd5f5959-5e1e-4205-a714-a914373942af
    name: autoscale-pool
    size: s-2vcpu-4gb
    auto_scale: true
    min_nodes: 1
    max_nodes: 10

- name: Delete node pool
  digitalocean.cloud.kubernetes_node_pool:
    token: "{{ token }}"
    state: absent
    cluster_id: bd5f5959-5e1e-4205-a714-a914373942af
    name: worker-pool

Return Values

KeyReturnedDescription
error
dict
failure DigitalOcean API error.
Sample:
{
  "Message": "Informational error message.",
  "Reason": "Unauthorized",
  "Status Code": 401
}
msg
str
always Node pool result information.
Sample:
[
  "Created node pool worker-pool",
  "Updated node pool worker-pool",
  "Deleted node pool worker-pool",
  "Node pool worker-pool would be created",
  "Node pool worker-pool exists",
  "Node pool worker-pool does not exist"
]
node_pool
dict
always Node pool information.
Sample:
{
  "auto_scale": false,
  "count": 3,
  "id": "cdda885e-7663-40c8-bc74-3a036c66545d",
  "max_nodes": 0,
  "min_nodes": 0,
  "name": "worker-pool",
  "nodes": [
    {
      "id": "123abc",
      "name": "worker-pool-abc123",
      "status": {
        "state": "running"
      }
    }
  ],
  "size": "s-2vcpu-4gb",
  "tags": [
    "production"
  ]
}

We can't find any results for your search.

Try using different keywords or simplifying your search terms.