Linode Kubernetes Engine (LKE) v4.78.3

Kubernetes Clusters List

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

Lists current Kubernetes clusters available on your account.

Authorizations

personalAccessToken
oauth lke: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
oauth lke:read_write

Request Body Schema

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
count
integer 1..100

The number of nodes in the Node Pool.

disks
array

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.

type
string

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

region
Required
string

This Kubernetes cluster’s location.

tags
Filterable
array

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

Request Samples

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
oauth lke:read_write

Path Parameters

clusterId integer 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
oauth lke:read_only

Path Parameters

clusterId integer 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
oauth lke:read_write

Path Parameters

clusterId integer Required

ID of the Kubernetes cluster to look up.

Request Body Schema

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

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.

Request Samples

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
oauth lke:read_only

Path Parameters

clusterId integer 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
oauth lke:read_write

Path Parameters

clusterId integer Required

ID of the Kubernetes cluster to look up.

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
oauth lke:read_only

Path Parameters

clusterId integer 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
oauth lke:read_write

Path Parameters

clusterId integer Required

ID of the Kubernetes cluster to look up.

Request Body Schema

count
Required
integer 1..100

The number of nodes in the Node Pool.

disks
array

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
Required
string
Enum: raw ext4

This custom disk partition’s filesystem type.

type
Required
string

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

Request Samples

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
oauth lke:read_write

Path Parameters

clusterId integer Required

ID of the Kubernetes cluster to look up.

poolId integer 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
oauth lke:read_only

Path Parameters

clusterId integer Required

ID of the Kubernetes cluster to look up.

poolId integer 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.

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
oauth lke:read_write

Path Parameters

clusterId integer Required

ID of the Kubernetes cluster to look up.

poolId integer Required

ID of the Pool to look up

Request Body Schema

count
integer 1..100

The number of nodes in the Node Pool.

Request Samples

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
oauth lke:read_write

Path Parameters

clusterId integer Required

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

poolId integer Required

ID of the Node Pool to be recycled.

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
oauth lke: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
oauth lke:read_only

Path Parameters

version string Required

The LKE version to view.

Request Samples

Response Samples

Responses