0

Get an LKE Kubernetes version (any tier)

by
Published Oct 17, 2025

View an LKE Kubernetes version available for deployment to a Kubernetes cluster (any tier) > --- - __CLI__. ``` linode-cli lke tiered-version-view standard 1.31 ``` [Learn more...](https://techdocs.akamai.com/cloud-computing/docs/getting-started-with-the-linode-cli) - __OAuth scopes__. ``` lke:read_only ``` [Learn more...](https://techdocs.akamai.com/linode-api/reference/get-started#oauth)

Script linode Verified

The script

Submitted by hugo697 Bun
Verified 235 days ago
1
//native
2
type Linode = {
3
  token: string;
4
};
5
/**
6
 * Get an LKE Kubernetes version (any tier)
7
 * View an LKE Kubernetes version available for deployment to a Kubernetes cluster (any tier)
8

9

10
>
11

12
---
13

14

15
- __CLI__.
16

17
    ```
18
    linode-cli lke tiered-version-view standard 1.31
19
    ```
20

21
    [Learn more...](https://techdocs.akamai.com/cloud-computing/docs/getting-started-with-the-linode-cli)
22

23
- __OAuth scopes__.
24

25
    ```
26
    lke:read_only
27
    ```
28

29
    [Learn more...](https://techdocs.akamai.com/linode-api/reference/get-started#oauth)
30
 */
31
export async function main(
32
  auth: Linode,
33
  apiVersion: "v4beta",
34
  tier: "standard" | "enterprise",
35
  version: string,
36
) {
37
  const url = new URL(
38
    `https://api.linode.com/${apiVersion}/lke/tiers/${tier}/versions/${version}`,
39
  );
40

41
  const response = await fetch(url, {
42
    method: "GET",
43
    headers: {
44
      Authorization: "Bearer " + auth.token,
45
    },
46
    body: undefined,
47
  });
48
  if (!response.ok) {
49
    const text = await response.text();
50
    throw new Error(`${response.status} ${text}`);
51
  }
52
  return await response.json();
53
}
54