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. (enabled, disabled) (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. > 🚧 > > This field is available as part of the beta API and is only returned for accounts that have been enrolled in the LKE Enterprise LA. (example: v1.31.8+lke3)
labelstringBeta The optional label defined for this node Pool. > 🚧 > > This field is available as part of the beta API and is only returned for accounts that have been enrolled in the LKE Enterprise LA. (example: app-pool)
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 that are members of this node pool. If a Linode has not been provisioned for a given node slot, the instance_id is 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. (rolling_update, on_recycle) (example: on_recycle)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectclusterId, poolIdGet a specific Node Pool by ID.

Learn more...

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

Learn more...

Learn more...
createinsertclusterId, type, countCreates a new Node Pool for the designated Kubernetes cluster.

Learn more...

Learn more...
updatereplaceclusterId, poolIdUpdates 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...
deletedeleteclusterId, poolIdDelete 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...
recycleexecclusterId, poolIdRecycles 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
clusterIdstringID of the Kubernetes cluster this Node Pool is attached to. (example: {{clusterId}})
poolIdstringID of the Node Pool to be recycled.

SELECT examples

Get a specific Node Pool by ID.

Learn more...

Learn more...

SELECT
id,
autoscaler,
count,
disk_encryption,
disks,
k8s_version,
label,
labels,
nodes,
tags,
taints,
type,
update_strategy
FROM linode.lke.node_pools
WHERE clusterId = '{{ clusterId }}' -- required
AND poolId = '{{ poolId }}' -- required
;

INSERT examples

Creates a new Node Pool for the designated Kubernetes cluster.

Learn more...

Learn more...

INSERT INTO linode.lke.node_pools (
autoscaler,
count,
disk_encryption,
disks,
k8s_version,
label,
labels,
tags,
taints,
type,
update_strategy,
clusterId
)
SELECT
'{{ autoscaler }}',
{{ count }} /* required */,
'{{ disk_encryption }}',
'{{ disks }}',
'{{ k8s_version }}',
'{{ label }}',
'{{ labels }}',
'{{ tags }}',
'{{ taints }}',
'{{ type }}' /* required */,
'{{ update_strategy }}',
'{{ clusterId }}'
RETURNING
id,
autoscaler,
count,
disk_encryption,
disks,
k8s_version,
label,
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
autoscaler = '{{ autoscaler }}',
count = {{ count }},
labels = '{{ labels }}',
tags = '{{ tags }}',
taints = '{{ taints }}'
WHERE
clusterId = '{{ clusterId }}' --required
AND poolId = '{{ poolId }}' --required
RETURNING
id,
autoscaler,
count,
disk_encryption,
disks,
k8s_version,
label,
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
WHERE clusterId = '{{ clusterId }}' --required
AND poolId = '{{ poolId }}' --required
;

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.recycle
@clusterId='{{ clusterId }}' --required,
@poolId='{{ poolId }}' --required
;