Linode Kubernetes Engine (LKE)

Kubernetes Clusters List

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

Lists current Kubernetes clusters available on your account.

Request Samples

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

Response Samples

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

Responses

200: Returns an array of all Kubernetes clusters on your Account.

data
array of objects
id
integer

This Kubernetes cluster's unique ID.

created
string

When this Kubernetes cluster was created.

label
Filterable
string

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.
updated
string

When this Kubernetes cluster was updated.

tags
Filterable
array

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

region
Filterable
string

This Kubernetes cluster's location.

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.

page
integer

The current page.

pages
integer

The total number of pages.

results
integer

The total number of results.

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

Request Body Schema

k8s_version
Required
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.

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

This Kubernetes cluster's location.

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.

tags
Filterable
array

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

Request Samples

curl -H "Content-Type: application/json" \
      -H "Authorization: Bearer $TOKEN" \
      -X POST -d '{
        "label": "cluster12345",
        "region": "us-central",
        "k8s_version": "1.25",
        "tags": ["ecomm", "blogs"],
        "control_plane": {
            "high_availability": true
          },
        "node_pools": [
          {
            "type": "g6-standard-4",
            "count": 6,
            "autoscaler": {
              "enabled": true,
              "max": 12,
              "min": 3
            }
          },
          {
            "type": "g6-standard-8",
            "count": 3
          }
        ]
      }' \
      https://api.linode.com/v4/lke/clusters

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: Kubernetes cluster creation has started.

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.