Linode Kubernetes Engine (LKE)

Kubernetes Cluster View

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

Get a specific Cluster by ID.

Path Parameters

clusterId
Required
integer

ID of the Kubernetes cluster to look up.

Request Samples

curl -H "Authorization: Bearer $TOKEN" \
      https://api.linode.com/v4/lke/clusters/12345

Response Samples

{
  "created": "2019-09-12T21:25:30Z",
  "updated": "2019-09-13T21:24:16Z",
  "id": 1234,
  "label": "lkecluster12345",
  "region": "us-central",
  "tags": [],
  "k8s_version": "1.25",
  "control_plane": {
    "high_availability": true
  }
}

Responses

200: Returns a single Kubernetes cluster.

created
string <date-time>

When this Kubernetes cluster was created.

updated
string <date-time>

When this Kubernetes cluster was updated.

id
integer

This Kubernetes cluster's unique ID.

label
Filterable
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.
region
Filterable
string

This Kubernetes cluster's location.

tags
Filterable
array of objects

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

k8s_version
Filterable
string

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

control_plane
object

Defines settings for the Kubernetes Control Plane. Allows for the enabling of High Availability (HA) for Control Plane Components. Enabling High Avaialability 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.

default: Error

errors
array of objects
reason
string

What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to open a Support Ticket or perform some other action before you can complete the request successfully.

field
string

The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as "null" if the error is not specific to any single element of the request.

Kubernetes Cluster Update

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

Updates a Kubernetes cluster.

Path Parameters

clusterId
Required
integer

ID of the Kubernetes cluster to look up.

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
Filterable
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

curl -H "Content-Type: application/json" \
      -H "Authorization: Bearer $TOKEN" \
      -X PUT -d '{
        "label": "lkecluster54321"
        "tags" : ["ecomm", "blog", "prod", "monitoring"]
        "control_plane": {
            "high_availability": true
          },
        "k8s_version": "1.17"
      }' \
      https://api.linode.com/v4/lke/clusters/12345

Response Samples

{
  "label": "lkecluster12345",
  "region": "us-central",
  "created": "2019-09-12T21:25:30Z",
  "updated": "2019-09-13T21:24:16Z",
  "tags": [],
  "k8s_version": "1.25"
}

Responses

200: Returns a single Kubernetes cluster.

label
Filterable
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 objects

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.

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.

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.

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

Path Parameters

clusterId
Required
integer

ID of the Kubernetes cluster to look up.

Request Samples

curl -H "Authorization: Bearer $TOKEN" \
      -X DELETE \
      https://api.linode.com/v4/lke/clusters/12345

Response Samples

{}

Responses

200: Delete successful

default: Error

errors
array of objects
reason
string

What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to open a Support Ticket or perform some other action before you can complete the request successfully.

field
string

The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as "null" if the error is not specific to any single element of the request.