clusters
Creates, updates, deletes, gets or lists a clusters
resource.
Overview
Name | clusters |
Type | Resource |
Id | linode.lke.clusters |
Fields
The following fields are returned by SELECT
queries:
- get_lke_cluster
- get_lke_clusters
Returns a single Kubernetes cluster.
Name | Datatype | Description |
---|---|---|
id | integer | Read-only This Kubernetes cluster's unique ID. |
apl_enabled | boolean | Write-once Indicates whether the Akamai App Platform is installed during creation of the LKE cluster. It defaults to false . If set to true , control_plane.high_availability also needs to be true . Automatic installation of the App Platform is only possible when creating a new cluster (not when modifying existing clusters). |
control_plane | object | Defines settings for the Kubernetes control plane, including enabling High Availability (HA) for the control plane. |
created | string (date-time) | Read-only When this Kubernetes cluster was created. (example: 2019-09-12T21:25:30Z) |
k8s_version | string | Filterable The desired Kubernetes version for this Kubernetes cluster in the format of <major>.<minor> . The latest supported patch version is deployed. (example: 1.32) |
label | string | Filterable 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. (example: lkecluster12345) |
region | string | Filterable This Kubernetes cluster's location. (example: us-central) |
tags | array | Filterable An array of tags applied to the Kubernetes cluster. Tags are for organizational purposes only. |
tier | string | Beta, Filterable The desired Kubernetes tier, either standard or enterprise . > 🚧 > > This field is in beta and only works when using the beta API. Call the URL with the apiVersion path parameter set to v4beta . (example: standard) |
updated | string (date-time) | Read-only When this Kubernetes cluster was updated. (example: 2019-09-13T21:24:16Z) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get_lke_cluster | select | Get a specific Cluster by ID. Learn more... Learn more... | ||
get_lke_clusters | select | Lists current Kubernetes clusters available on your account. Learn more... Learn more... | ||
post_lke_cluster | insert | data__label , data__region , data__k8s_version , data__node_pools | 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 endpoints and the Kubeconfig file for the new cluster are ready. Learn more... Learn more... | |
put_lke_cluster | replace | Updates a Kubernetes cluster. Learn more... Learn more... | ||
delete_lke_cluster | delete | 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 Learn more... Learn more... | ||
post_lke_cluster_recycle | exec | 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.Learn more... Learn more... | ||
post_lke_cluster_regenerate | exec | Regenerate the Kubeconfig file and/or the service account token for a Cluster. This is a helper operation that allows performing both the Delete a Kubeconfig and the Delete a service token operations with a single request. When using this operation, at least one of kubeconfig or servicetoken is required.> 📘 > > 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 shouldn't experience any disruption, while standard clusters may experience brief control plane downtime while components are restarted. Learn more... Learn more... | ||
delete_lke_service_token | exec | Delete and regenerate the service account token for a Cluster. > 📘 > > When you regenerate 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 shouldn't experience any disruption, while standard clusters may experience brief control plane downtime while components are restarted. Learn more... Learn more... |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|
SELECT
examples
- get_lke_cluster
- get_lke_clusters
Get a specific Cluster by ID.
Learn more...
Learn more...
SELECT
id,
apl_enabled,
control_plane,
created,
k8s_version,
label,
region,
tags,
tier,
updated
FROM linode.lke.clusters;
Lists current Kubernetes clusters available on your account.
Learn more...
Learn more...
SELECT
data,
page,
pages,
results
FROM linode.lke.clusters;
INSERT
examples
- post_lke_cluster
- Manifest
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 endpoints and the Kubeconfig file for the new cluster are ready.
Learn more...
Learn more...
INSERT INTO linode.lke.clusters (
data__apl_enabled,
data__control_plane,
data__k8s_version,
data__label,
data__node_pools,
data__region,
data__tags,
data__tier
)
SELECT
{{ apl_enabled }},
'{{ control_plane }}',
'{{ k8s_version }}' --required,
'{{ label }}' --required,
'{{ node_pools }}' --required,
'{{ region }}' --required,
'{{ tags }}',
'{{ tier }}'
RETURNING
id,
apl_enabled,
control_plane,
created,
k8s_version,
label,
region,
tags,
tier,
updated
;
# Description fields are for documentation purposes
- name: clusters
props:
- name: apl_enabled
value: boolean
description: >
__Write-once__ Indicates whether the Akamai App Platform is installed during creation of the LKE cluster. It defaults to `false`. If set to `true`, `control_plane.high_availability` also needs to be `true`. Automatic installation of the App Platform is only possible when creating a new cluster (not when modifying existing clusters).
- name: control_plane
value: object
description: >
Defines settings for the Kubernetes control plane, including High Availability (HA) and an IP-based Access Control List (ACL) for the control plane components.
- name: k8s_version
value: string
description: >
__Filterable__ The desired Kubernetes version for this Kubernetes cluster in the format of `<major>.<minor>`. The latest supported patch version is deployed.
- name: label
value: string
description: >
__Filterable__ 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.
- name: node_pools
value: array
- name: region
value: string
description: >
__Filterable__ This Kubernetes cluster's location.
- name: tags
value: array
description: >
__Filterable__ An array of tags applied to the Kubernetes cluster. Tags are for organizational purposes only.
- name: tier
value: string
description: >
__Beta__, __Filterable__ The desired Kubernetes tier, either `standard` or `enterprise`.
> 🚧
>
> This field is in beta and only works when using the beta API. Call the URL with the `apiVersion` path parameter set to `v4beta`.
valid_values: ['standard', 'enterprise']
REPLACE
examples
- put_lke_cluster
Updates a Kubernetes cluster.
Learn more...
Learn more...
REPLACE linode.lke.clusters
SET
data__control_plane = '{{ control_plane }}',
data__k8s_version = '{{ k8s_version }}',
data__label = '{{ label }}',
data__tags = '{{ tags }}'
WHERE
RETURNING
created,
k8s_version,
label,
region,
tags,
updated;
DELETE
examples
- delete_lke_cluster
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
Learn more...
Learn more...
DELETE FROM linode.lke.clusters;
Lifecycle Methods
- post_lke_cluster_recycle
- post_lke_cluster_regenerate
- delete_lke_service_token
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.
Learn more...
Learn more...
EXEC linode.lke.clusters.post_lke_cluster_recycle
;
Regenerate the Kubeconfig file and/or the service account token for a Cluster.
This is a helper operation that allows performing both the Delete a Kubeconfig and the Delete a service token operations with a single request.
When using this operation, at least one of kubeconfig
or servicetoken
is required.
> 📘
>
> 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 shouldn't experience any disruption, while standard clusters may experience brief control plane downtime while components are restarted.
Learn more...
Learn more...
EXEC linode.lke.clusters.post_lke_cluster_regenerate
@@json=
'{
"kubeconfig": {{ kubeconfig }},
"servicetoken": {{ servicetoken }}
}';
Delete and regenerate the service account token for a Cluster.
> 📘
>
> When you regenerate 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 shouldn't experience any disruption, while standard clusters may experience brief control plane downtime while components are restarted.
Learn more...
Learn more...
EXEC linode.lke.clusters.delete_lke_service_token
;