Skip to main content

node_pools

Creates, updates, deletes, gets or lists a node_pools resource.

Overview

Namenode_pools
TypeResource
Idlinode.lke.node_pools

Fields

The following fields are returned by SELECT queries:

Returns the requested Node Pool.

NameDatatypeDescription
idintegerFilterable This Node Pool's unique ID.
autoscalerobjectWhen enabled, the number of nodes autoscales within the defined minimum and maximum values.
countintegerThe number of nodes in the Node Pool.
disk_encryptionstringIndicates the local disk encryption setting for this LKE node pool. (example: disabled)
disksarrayThis Node Pool's custom disk layout. (x-linode-cli-format: json)
k8s_versionstringBeta The Kubernetes version used for the worker nodes within this node pool. (example: v1.31.8+lke3)
labelsobjectKey-value pairs added as labels to nodes in the node pool. Labels help classify your nodes and easily select subsets of objects. To learn more, review Add Labels and Taints to your LKE node pools.
nodesarrayStatus information for the Nodes which are members of this Node Pool. If a Linode has not been provisioned for a given Node slot, the instance_id will be returned as null.
tagsarrayFilterable An array of tags applied to this object. Tags are for organizational purposes only.
taintsarrayKubernetes taints added to nodes in the node pool. Taints help control how pods are scheduled onto nodes, specifically allowing them to repel certain pods.
typestringThe Linode Type for all of the nodes in the Node Pool. (example: g6-standard-4)
update_strategystringBeta Determines when the worker nodes within this node pool upgrade to the latest selected Kubernetes version, after the cluster has been upgraded. This field is required for LKE Enterprise clusters but should not be used for non-enterprise LKE clusters. (example: on_recycle)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_lke_node_poolselectGet a specific Node Pool by ID.

Learn more...

Learn more...
get_lke_cluster_poolsselectReturns all active Node Pools on a Kubernetes cluster.

Learn more...

Learn more...
post_lke_cluster_poolsinsertdata__type, data__countCreates a new Node Pool for the designated Kubernetes cluster.

Learn more...

Learn more...
put_lke_node_poolreplaceUpdates a node pool's count, labels and taints, and autoscaler configuration.

Linodes are created or deleted to match changes to the Node Pool's count.

Specifying labels or taints on update overwrites any previous values, and updates existing nodes with the new values without a recycle.

Any local storage on deleted Linodes (such as hostPath and emptyDir volumes, or local PersistentVolumes) will be erased.

Learn more...

Learn more...
delete_lke_node_pooldeleteDelete a specific Node Pool from a Kubernetes cluster.

Deleting a Node Pool is a destructive action and cannot be undone.

Deleting a Node Pool will delete all Linodes within that Pool.

Learn more...

Learn more...
post_lke_cluster_pool_recycleexecRecycles a Node Pool for the designated Kubernetes Cluster. All Linodes within the Node Pool will be deleted and replaced with new Linodes on a rolling basis, which may take several minutes. Replacement Nodes are installed with the latest available patch for the Cluster's Kubernetes Version.

Any local storage on deleted Linodes (such as hostPath and emptyDir volumes, or local PersistentVolumes) will be erased.

Learn more...

Learn more...

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription

SELECT examples

Get a specific Node Pool by ID.

Learn more...

Learn more...

SELECT
id,
autoscaler,
count,
disk_encryption,
disks,
k8s_version,
labels,
nodes,
tags,
taints,
type,
update_strategy
FROM linode.lke.node_pools;

INSERT examples

Creates a new Node Pool for the designated Kubernetes cluster.

Learn more...

Learn more...

INSERT INTO linode.lke.node_pools (
data__autoscaler,
data__count,
data__disks,
data__k8s_version,
data__labels,
data__tags,
data__taints,
data__type,
data__update_strategy
)
SELECT
'{{ autoscaler }}',
{{ count }} --required,
'{{ disks }}',
'{{ k8s_version }}',
'{{ labels }}',
'{{ tags }}',
'{{ taints }}',
'{{ type }}' --required,
'{{ update_strategy }}'
RETURNING
id,
autoscaler,
count,
disk_encryption,
disks,
k8s_version,
labels,
nodes,
tags,
taints,
type,
update_strategy
;

REPLACE examples

Updates a node pool's count, labels and taints, and autoscaler configuration.

Linodes are created or deleted to match changes to the Node Pool's count.

Specifying labels or taints on update overwrites any previous values, and updates existing nodes with the new values without a recycle.

Any local storage on deleted Linodes (such as hostPath and emptyDir volumes, or local PersistentVolumes) will be erased.

Learn more...

Learn more...

REPLACE linode.lke.node_pools
SET
data__autoscaler = '{{ autoscaler }}',
data__count = {{ count }},
data__labels = '{{ labels }}',
data__taints = '{{ taints }}'
WHERE

RETURNING
id,
autoscaler,
count,
disk_encryption,
disks,
k8s_version,
labels,
nodes,
tags,
taints,
type,
update_strategy;

DELETE examples

Delete a specific Node Pool from a Kubernetes cluster.

Deleting a Node Pool is a destructive action and cannot be undone.

Deleting a Node Pool will delete all Linodes within that Pool.

Learn more...

Learn more...

DELETE FROM linode.lke.node_pools;

Lifecycle Methods

Recycles a Node Pool for the designated Kubernetes Cluster. All Linodes within the Node Pool will be deleted and replaced with new Linodes on a rolling basis, which may take several minutes. Replacement Nodes are installed with the latest available patch for the Cluster's Kubernetes Version.

Any local storage on deleted Linodes (such as hostPath and emptyDir volumes, or local PersistentVolumes) will be erased.

Learn more...

Learn more...

EXEC linode.lke.node_pools.post_lke_cluster_pool_recycle 
;