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_scalebool |
Enable auto-scaling for the node pool. | |
client_override_optionsdict |
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_idstr / required |
The UUID of the Kubernetes cluster. | |
countint |
The number of Droplet instances in the node pool. | |
idstr |
The unique identifier of the node pool. Used for lookup when updating or deleting. | |
labelsdict |
An object of key/value mappings specifying labels to apply to nodes. | |
max_nodesint |
Maximum number of nodes for auto-scaling. | |
min_nodesint |
Minimum number of nodes for auto-scaling. | |
module_override_optionsdict |
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. | |
namestr / required |
The name of the node pool. | |
sizestr |
The slug identifier for the size of the nodes. | |
statestr |
Choices:
|
State of the resource, present to create, absent to destroy. |
tagslist / elements=str |
An array of tags to apply to the node pool. | |
taintslist / elements=dict |
An array of taints to apply to nodes in the pool. | |
timeoutint |
Default: 300 |
Polling timeout in seconds. |
tokenstr |
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-poolReturn Values
| Key | Returned | Description |
|---|---|---|
errordict |
failure | DigitalOcean API error. Sample: |
msgstr |
always | Node pool result information. Sample: |
node_pooldict |
always | Node pool information. Sample: |