Create a node pool

Creates a new node pool for the designated Kubernetes cluster.

Permissions and scopes

To call this operation, you need permissions, based on the model you're using:

  • Identity and access permissions. Your user needs a role with these permissions. Learn more.

    • Roles: lkecluster_admin
  • OAuth scopes. Your user needs these scopes assigned. Learn more.

    • Scopes: lke:read_write

CLI

linode-cli lke pool-create 12345 \ --type g6-standard-4 \ --count 6 \ --tags example-tag \ --autoscaler.enabled true \ --autoscaler.max 12 \ --autoscaler.min 3 \ --labels '{ "example.com/my-app":"team1" }' \ --taints.effect "NoSchedule" \ --taints.key "example.com/my-app" \ --taints.value "teamA"

Learn more

Path Params
string
enum
required

Enum Call either the v4 URL, or v4beta for operations still in Beta.

Allowed:
integer
required

ID of the Kubernetes cluster to look up.

Body Params
autoscaler
object

When enabled, the number of nodes automatically scales within the defined minimum and maximum values. When making a request, max and min require each other.

integer
required
1 to 100

The number of nodes in the node pool.

string
enum
Defaults to disabled

Local disk encryption setting for this LKE node pool. Defaults to disabled.

Allowed:
disks
array of objects

This node pool's custom disk layout. Each item in this array will create a new disk partition for each node in this node pool.

📘

Omit this field, except for special use cases. The disks specified here are partitions in addition to the primary partition and reduce the size of the primary partition. This can lead to stability problems for the node.

  • The custom disk layout is applied to each node in this node pool.

  • The maximum number of custom disk partitions that can be configured is 7.

  • Once the requested disk partitions are allocated, the remaining disk space is allocated to the node's boot disk.

  • A node pool's custom disk layout is immutable over the lifetime of the node pool.

disks
integer

Beta, LKE Enterprise The id of the Cloud Firewall that you wish to assign to this node pool. Review Recommended firewall settings to learn which rules should be configured within your firewall for compatibility with LKE.

🚧

This field is available as part of the beta API and can only be used by accounts with access to LKE Enterprise. Call the URL with the apiVersion path parameter set to v4beta.

string

Beta, LKE Enterprise The LKE-specific Kubernetes version to use for the worker nodes within this node pool. This field is required when creating node pools on LKE Enterprise clusters.

🚧

This field is available as part of the beta API and can only be used by accounts with access to LKE Enterprise. Call the URL with the apiVersion path parameter set to v4beta.

string
length between 1 and 32

An optional label for this node pool. Labels can be up to 32 characters long, containing lowercase alphanumeric characters optionally interspersed with dashes.

A node pool's label also cascades down to its nodes (Linodes). If a label is defined on the node pool, the label for each node is <cluster-id>-<nodepool-label>-<hash>. If not, the label is <cluster-id>-<nodepool-id>-<hash>.

labels
object

Key-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 the Labels and taints guide.

Label key:

  • A key can contain alphanumeric characters, dashes (-), underscores (_), or dots (.). Start and end it with an alphanumeric character.

  • If the key begins with a DNS subdomain prefix followed by a single slash, for example example.com/my-app, the maximum total length of the label key is 128 characters. Domain labels can be up to 62 characters after the '/'. The prefix needs to adhere to RFC 1123 DNS subdomain restrictions.

  • If the key doesn't begin with a DNS subdomain prefix, the maximum key length is 63 characters.

Specifying an empty object removes all previously set labels.

Label value:

  • The label's value can contain alphanumeric characters, dashes (-), underscores (_), or dots (.). Start and end it with an alphanumeric character.

  • Can be specified as an empty string value with "".

tags
array of strings

Filterable Organizational tags to apply to this node pool. When you apply tags to LKE Enterprise node pools, they also apply to the nodes (Linodes) within the node pool. Tags don't cascade down to nodes in non-Enterprise node pools.

tags
taints
array of objects
length ≥ 0

Kubernetes taints to add to node pool nodes. Taints help control how pods are scheduled onto nodes, specifically allowing them to repel certain pods. To learn more, review the Labels and taints guide.

Specifying an empty array ([]) removes all previously set taints.

taints
string
required

The Linode type for all of the nodes in the node pool.

string
enum

Beta, LKE Enterprise 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 when creating node pools on LKE Enterprise clusters.

  • rolling_update: Immediately triggers a recycle of this node pool when the Kubernetes version is updated.
  • on_recycle (default): Does not trigger any immediate recycle. New worker nodes are created with the new Kubernetes version. Existing worker nodes will be upgraded when a recycle is manually triggered.
🚧

This field is available as part of the beta API and can only be used by accounts with access to LKE Enterprise. Call the URL with the apiVersion path parameter set to v4beta.

Allowed:
Responses

Response body
object
autoscaler
object

When enabled, the number of nodes autoscales within the defined minimum and maximum values.

boolean

Whether autoscaling is enabled for this node pool. Defaults to false.

integer
1 to 100

The maximum number of nodes to autoscale to. Defaults to the node pool's count.

integer
1 to 100

The minimum number of nodes to autoscale to. Defaults to the node pool's count.

integer
1 to 100

The number of nodes in the node pool.

string
enum

Indicates the local disk encryption setting for this LKE node pool.

enabled disabled

disks
array of objects

This node pool's custom disk layout.

disks
object
integer

The size of this custom disk partition in MB. The size of this disk partition can't exceed the capacity of the node's plan type.

string
enum

This custom disk partition's filesystem type.

raw ext4

integer

Beta, LKE Enterprise The id of the Cloud Firewall assigned to this node pool.

integer

Filterable This node pool's unique ID.

string

Beta The Kubernetes version used for the worker nodes within this node pool.

🚧

This field is available as part of the beta API and can only be used by accounts with access to LKE Enterprise. Call the URL with the apiVersion path parameter set to v4beta.

string
length between 1 and 32

The optional label defined for this node pool.

labels
object

Key-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 the Labels and taints guide.

Has additional fields
locks
array of strings

Beta, Read-only Indicates if the node pool is protected by a resource lock. Supported values are:

  • cannot_delete. The node pool can't be deleted.

  • An empty array indicates there is no resource lock. The cluster can be deleted.

Only account administrators can remove locks using the Delete a resource lock operation.

🚧

  • This field is available as part of the beta API. Call the URL with the apiVersion path parameter set to v4beta.

  • The cannot_delete_with_subresources form of lock that's available with other resources does not apply to an LKE node pool.

locks
nodes
array of objects

Read-only Status 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.

nodes
object
string

The Node's ID.

integer | null

The Linode's ID. When no Linode is currently provisioned for this node, this is null.

integer

Beta, LKE Enterprise The ID of the parent node pool.

🚧

This field is available as part of the beta API and can only be used by accounts with access to LKE Enterprise. Call the URL with the apiVersion path parameter set to v4beta.

string
enum

The creation status of this node. This status is distinct from this node's readiness as a Kubernetes node object as determined by the command kubectl get nodes.

not_ready indicates that the Linode is still being created.

ready indicates that the Linode has successfully been created and is running Kubernetes software.

ready not_ready

tags
array of strings

Filterable An array of tags applied to this object. Tags are for organizational purposes only.

tags
taints
array of objects

Kubernetes taints added to nodes in the node pool. Taints help control how pods are scheduled onto nodes, specifically allowing them to repel certain pods.

taints
object
string
enum

The Kubernetes taint effect. For NoSchedule, PreferNoSchedule and NoExecute descriptions, see Kubernetes Taints and Tolerations.

NoSchedule PreferNoSchedule NoExecute

string
length between 1 and 63

The Kubernetes taint key.

string
length between 0 and 63

The Kubernetes taint value.

string

The Linode type for all of the nodes in the node pool.

string
enum

Beta 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

Language
Credentials
Original text
Rate this translation
Your feedback will be used to help improve Google Translate