Linode Kubernetes Engine (LKE) v4.166.0

Kubernetes Clusters List

GET https://api.linode.com/v4/lke/clusters

Lists current Kubernetes clusters available on your account.

Authorizations

personalAccessToken
oauthlke:read_only

Request Samples

Response Samples

Responses

Kubernetes Cluster Create

POST https://api.linode.com/v4/lke/clusters

Creates a Kubernetes cluster. The Kubernetes cluster will be created asynchronously. You can use the events system to determine when the Kubernetes cluster is ready to use. Please note that it often takes 2-5 minutes before the Kubernetes API server endpoint and the Kubeconfig file for the new cluster are ready.

Authorizations

personalAccessToken
oauthlke:read_write

Request Samples

Request Body Schema

control_plane
object

Defines settings for the Kubernetes Control Plane. Allows for the enabling of High Availability (HA) for Control Plane Components. Enabling High Availability for LKE is an irreversible change.

high_availability
boolean

Defines whether High Availability is enabled for the Control Plane Components of the cluster. Defaults to false.

k8s_version
Required
string

The desired Kubernetes version for this Kubernetes cluster in the format of <major>.<minor>, and the latest supported patch version will be deployed.

label
Required
string 1..32 characters

This Kubernetes cluster’s unique label for display purposes only. Labels have the following constraints:

  • UTF-8 characters will be returned by the API using escape sequences of their Unicode code points. For example, the Japanese character is 3 bytes in UTF-8 (0xE382AB). Its Unicode code point is 2 bytes (0x30AB). APIv4 supports this character and the API will return it as the escape sequence using six 1 byte characters which represent 2 bytes of Unicode code point ("\u30ab").
  • 4 byte UTF-8 characters are not supported.
  • If the label is entirely composed of UTF-8 characters, the API response will return the code points using up to 193 1 byte characters.

node_pools
Required
array of objects
autoscaler
object

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

When making a request, max and min require each other.

enabled
boolean

Whether autoscaling is enabled for this Node Pool. Defaults to false.

max
integer 1..100

The maximum number of nodes to autoscale to. Defaults to the Node Pool’s count. Defaults to the value provided by the count field.

min
integer 1..100

The minimum number of nodes to autoscale to. Defaults to the Node Pool’s count.

count
Required
integer 1..100

The number of nodes in the Node Pool.

disks
array of objects

Note: This field should be omitted 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, which can lead to stability problems for the Node.

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.

  • 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 paritions 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.

size
integer

The size of this custom disk partition in MB.

  • The size of this disk partition must not exceed the capacity of the node’s plan type.

type
string
Enum: raw ext4

This custom disk partition’s filesystem type.

tags
array of strings

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

type
Required
string

The Linode Type for all of the nodes in the Node Pool.

region
Required
string

This Kubernetes cluster’s location.

tags
array of strings

An array of tags applied to the Kubernetes cluster. Tags are for organizational purposes only.

Response Samples

Responses

Kubernetes Cluster Delete

DELETE https://api.linode.com/v4/lke/clusters/{clusterId}

Deletes a Cluster you have permission to read_write.

Deleting a Cluster is a destructive action and cannot be undone.

Deleting a Cluster:

  • Deletes all Linodes in all pools within this Kubernetes cluster
  • Deletes all supporting Kubernetes services for this Kubernetes cluster (API server, etcd, etc)
  • Deletes all NodeBalancers created by this Kubernetes cluster
  • Does not delete any of the volumes created by this Kubernetes cluster

Authorizations

personalAccessToken
oauthlke:read_write

Path Parameters

clusterIdinteger
Required

ID of the Kubernetes cluster to look up.

Request Samples

Response Samples

Responses

Kubernetes Cluster View

GET https://api.linode.com/v4/lke/clusters/{clusterId}

Get a specific Cluster by ID.

Authorizations

personalAccessToken
oauthlke:read_only

Path Parameters

clusterIdinteger
Required

ID of the Kubernetes cluster to look up.

Request Samples

Response Samples

Responses

Kubernetes Cluster Update

PUT https://api.linode.com/v4/lke/clusters/{clusterId}

Updates a Kubernetes cluster.

Authorizations

personalAccessToken
oauthlke:read_write

Path Parameters

clusterIdinteger
Required

ID of the Kubernetes cluster to look up.

Request Samples

Request Body Schema

control_plane
object

Defines settings for the Kubernetes Control Plane. Allows for the enabling of High Availability (HA) for Control Plane Components.

Enabling High Availability for LKE is an irreversible change.

When upgrading pre-existing LKE clusters to use the HA Control Plane, the following changes will additionally occur:

  • All nodes will be deleted and new nodes will be created to replace them.

  • Any local storage (such as hostPath volumes) will be erased.

  • The upgrade process may take several minutes to complete, as nodes will be replaced on a rolling basis.

high_availability
boolean

Defines whether High Availability is enabled for the Control Plane Components of the cluster. Defaults to false.

k8s_version
string

The desired Kubernetes version for this Kubernetes cluster in the format of <major>.<minor>. New and recycled Nodes in this cluster will be installed with the latest available patch for the Cluster’s Kubernetes version.

When upgrading the Kubernetes version, only the next latest minor version following the current version can be deployed. For example, a cluster with Kubernetes version 1.19 can be upgraded to version 1.20, but not directly to 1.21.

The Kubernetes version of a cluster can not be downgraded.

label
string 1..32 characters

This Kubernetes cluster’s unique label for display purposes only. Labels have the following constraints:

  • UTF-8 characters will be returned by the API using escape sequences of their Unicode code points. For example, the Japanese character is 3 bytes in UTF-8 (0xE382AB). Its Unicode code point is 2 bytes (0x30AB). APIv4 supports this character and the API will return it as the escape sequence using six 1 byte characters which represent 2 bytes of Unicode code point ("\u30ab").
  • 4 byte UTF-8 characters are not supported.
  • If the label is entirely composed of UTF-8 characters, the API response will return the code points using up to 193 1 byte characters.

tags
array of strings

An array of tags applied to the Kubernetes cluster. Tags are for organizational purposes only. To delete a tag, exclude it from your tags array.

Response Samples

Responses

Kubernetes API Endpoints List

GET https://api.linode.com/v4/lke/clusters/{clusterId}/api-endpoints

List the Kubernetes API server endpoints for this cluster. Please note that it often takes 2-5 minutes before the endpoint is ready after first creating a new cluster.

Authorizations

personalAccessToken
oauthlke:read_only

Path Parameters

clusterIdinteger
Required

ID of the Kubernetes cluster to look up.

Request Samples

Response Samples

Responses

Kubernetes Cluster Dashboard URL View

GET https://api.linode.com/v4/lke/clusters/{clusterId}/dashboard

Get a Kubernetes Dashboard access URL for this Cluster, which enables performance of administrative tasks through a web interface.

Dashboards are installed for Clusters by default.

To access the Cluster Dashboard login prompt, enter the URL in a web browser. Select either Token or Kubeconfig authentication, then select Sign in.

For additional guidance on using the Cluster Dashboard, see the Navigating the Cluster Dashboard section of our guide on Using the Kubernetes Dashboard on LKE.

Authorizations

personalAccessToken
oauthlke:read_only

Path Parameters

clusterIdinteger
Required

ID of the Kubernetes cluster to look up.

Request Samples

Response Samples

Responses

Kubeconfig Delete

DELETE https://api.linode.com/v4/lke/clusters/{clusterId}/kubeconfig

Delete and regenerate the Kubeconfig file for a Cluster.

Authorizations

personalAccessToken
oauthlke:read_write

Path Parameters

clusterIdinteger
Required

ID of the Kubernetes cluster to look up.

Request Samples

Response Samples

Responses

Kubeconfig View

GET https://api.linode.com/v4/lke/clusters/{clusterId}/kubeconfig

Get the Kubeconfig file for a Cluster. Please note that it often takes 2-5 minutes before the Kubeconfig file is ready after first creating a new cluster.

Authorizations

personalAccessToken
oauthlke:read_write

Path Parameters

clusterIdinteger
Required

ID of the Kubernetes cluster to look up.

Request Samples

Response Samples

Responses

Node Delete

DELETE https://api.linode.com/v4/lke/clusters/{clusterId}/nodes/{nodeId}

Deletes a specific Node from a Node Pool.

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

Deleting a Node will reduce the size of the Node Pool it belongs to.

Authorizations

personalAccessToken
oauthlke:read_write

Path Parameters

clusterIdinteger
Required

ID of the Kubernetes cluster containing the Node.

nodeIdstring
Required

ID of the Node to look up.

Request Samples

Response Samples

Responses

Node View

GET https://api.linode.com/v4/lke/clusters/{clusterId}/nodes/{nodeId}

Returns the values for a specified node object.

Authorizations

personalAccessToken
oauthlke:read_write

Path Parameters

clusterIdinteger
Required

ID of the Kubernetes cluster containing the Node.

nodeIdstring
Required

ID of the Node to look up.

Request Samples

Response Samples

Responses

Node Recycle

POST https://api.linode.com/v4/lke/clusters/{clusterId}/nodes/{nodeId}/recycle

Recycles an individual Node in the designated Kubernetes Cluster. The Node will be deleted and replaced with a new Linode, which may take a few 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.

Authorizations

personalAccessToken
oauthlke:read_write

Path Parameters

clusterIdinteger
Required

ID of the Kubernetes cluster containing the Node.

nodeIdstring
Required

ID of the Node to be recycled.

Request Samples

Response Samples

Responses

Node Pools List

GET https://api.linode.com/v4/lke/clusters/{clusterId}/pools

Returns all active Node Pools on a Kubernetes cluster.

Authorizations

personalAccessToken
oauthlke:read_only

Path Parameters

clusterIdinteger
Required

ID of the Kubernetes cluster to look up.

Request Samples

Response Samples

Responses

Node Pool Create

POST https://api.linode.com/v4/lke/clusters/{clusterId}/pools

Creates a new Node Pool for the designated Kubernetes cluster.

Authorizations

personalAccessToken
oauthlke:read_write

Path Parameters

clusterIdinteger
Required

ID of the Kubernetes cluster to look up.

Request Samples

Request Body Schema

autoscaler
object

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

When making a request, max and min require each other.

enabled
boolean

Whether autoscaling is enabled for this Node Pool. Defaults to false.

max
integer 1..100

The maximum number of nodes to autoscale to. Defaults to the Node Pool’s count. Defaults to the value provided by the count field.

min
integer 1..100

The minimum number of nodes to autoscale to. Defaults to the Node Pool’s count.

count
Required
integer 1..100

The number of nodes in the Node Pool.

disks
array of objects

Note: This field should be omitted 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, which can lead to stability problems for the Node.

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.

  • 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 paritions 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.

size
integer

The size of this custom disk partition in MB.

  • The size of this disk partition must not exceed the capacity of the node’s plan type.

type
string
Enum: raw ext4

This custom disk partition’s filesystem type.

tags
array of strings

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

type
Required
string

The Linode Type for all of the nodes in the Node Pool.

Response Samples

Responses

Node Pool Delete

DELETE https://api.linode.com/v4/lke/clusters/{clusterId}/pools/{poolId}

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.

Authorizations

personalAccessToken
oauthlke:read_write

Path Parameters

clusterIdinteger
Required

ID of the Kubernetes cluster to look up.

poolIdinteger
Required

ID of the Pool to look up

Request Samples

Response Samples

Responses

Node Pool View

GET https://api.linode.com/v4/lke/clusters/{clusterId}/pools/{poolId}

Get a specific Node Pool by ID.

Authorizations

personalAccessToken
oauthlke:read_only

Path Parameters

clusterIdinteger
Required

ID of the Kubernetes cluster to look up.

poolIdinteger
Required

ID of the Pool to look up

Request Samples

Response Samples

Responses

Node Pool Update

PUT https://api.linode.com/v4/lke/clusters/{clusterId}/pools/{poolId}

Updates a Node Pool’s count and autoscaler configuration.

Linodes will be created or deleted to match changes to the Node Pool’s count.

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

Authorizations

personalAccessToken
oauthlke:read_write

Path Parameters

clusterIdinteger
Required

ID of the Kubernetes cluster to look up.

poolIdinteger
Required

ID of the Pool to look up

Request Samples

Request Body Schema

autoscaler
object

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

When making a request, max and min require each other.

enabled
boolean

Whether autoscaling is enabled for this Node Pool. Defaults to false.

max
integer 1..100

The maximum number of nodes to autoscale to. Defaults to the Node Pool’s count. Defaults to the value provided by the count field.

min
integer 1..100

The minimum number of nodes to autoscale to. Defaults to the Node Pool’s count.

count
integer 1..100

The number of nodes in the Node Pool.

Response Samples

Responses

Node Pool Recycle

POST https://api.linode.com/v4/lke/clusters/{clusterId}/pools/{poolId}/recycle

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.

Authorizations

personalAccessToken
oauthlke:read_write

Path Parameters

clusterIdinteger
Required

ID of the Kubernetes cluster this Node Pool is attached to.

poolIdinteger
Required

ID of the Node Pool to be recycled.

Request Samples

Response Samples

Responses

Cluster Nodes Recycle

POST https://api.linode.com/v4/lke/clusters/{clusterId}/recycle

Recycles all nodes in all pools of a designated Kubernetes Cluster. All Linodes within the Cluster 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 version for the Cluster’s current Kubernetes minor release.

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

Authorizations

personalAccessToken
oauthlke:read_write

Path Parameters

clusterIdinteger
Required

ID of the Kubernetes cluster which contains nodes to be recycled.

Request Samples

Response Samples

Responses

Kubernetes Cluster Regenerate

POST https://api.linode.com/v4/lke/clusters/{clusterId}/regenerate

Regenerate the Kubeconfig file and/or the service account token for a Cluster.

This is a helper command that allows performing both the Kubeconfig Delete and the Service Token Delete actions with a single request.

When using this command, at least one of kubeconfig or servicetoken is required.

Note: When regenerating a service account token, the Cluster’s control plane components and Linode CSI drivers are also restarted and configured with the new token. High Availability Clusters should not experience any disruption, while standard Clusters may experience brief control plane downtime while components are restarted.

Authorizations

personalAccessToken
oauthlke:read_write

Path Parameters

clusterIdinteger
Required

ID of the target Kubernetes cluster.

Request Samples

Request Body Schema

kubeconfig
boolean
Default: false

Whether to delete and regenerate the Kubeconfig file for this Cluster.

servicetoken
boolean
Default: false

Whether to delete and regenerate the service access token for this Cluster.

Response Samples

Responses

Service Token Delete

DELETE https://api.linode.com/v4/lke/clusters/{clusterId}/servicetoken

Delete and regenerate the service account token for a Cluster.

Note: When regenerating a service account token, the Cluster’s control plane components and Linode CSI drivers are also restarted and configured with the new token. High Availability Clusters should not experience any disruption, while standard Clusters may experience brief control plane downtime while components are restarted.

Authorizations

personalAccessToken
oauthlke:read_write

Path Parameters

clusterIdinteger
Required

ID of the target Kubernetes cluster.

Request Samples

Response Samples

Responses

Kubernetes Versions List

GET https://api.linode.com/v4/lke/versions

List the Kubernetes versions available for deployment to a Kubernetes cluster.

Authorizations

personalAccessToken
oauthlke:read_only

Request Samples

Response Samples

Responses

Kubernetes Version View

GET https://api.linode.com/v4/lke/versions/{version}

View a Kubernetes version available for deployment to a Kubernetes cluster.

Authorizations

personalAccessToken
oauthlke:read_only

Path Parameters

versionstring
Required

The LKE version to view.

Request Samples

Response Samples

Responses