Create a Kubernetes cluster

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.

Permissions and scopes

To call this operation, you need permissions, based on the model you're using:

  • Identity and access permissions. Your user needs a role with these permissions. Learn more.

    • Roles: account_lkecluster_creator
  • OAuth scopes. Your user needs these scopes assigned. Learn more.

    • Scopes: lke:read_write

CLI

linode-cli lke cluster-create \
  --label cluster12345 \
  --region us-central \
  --k8s_version 1.33 \
  --apl_enabled false \
  --control_plane.high_availability true \
  --node_pools.type g6-standard-4 --node_pools.count 6 \
  --node_pools.type g6-standard-8 --node_pools.count 3 \
  --node_pools.autoscaler.enabled true \
  --node_pools.autoscaler.max 12 \
  --node_pools.autoscaler.min 3 \
  --tags ecomm

Learn more

Path Params
string
enum
required

Enum Call either the v4 URL, or v4beta for operations still in Beta.

Allowed:
Body Params

Configuration for the Kubernetes cluster.

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 High Availability (HA) and an IP-based Access Control List (ACL) for the control plane components.

string
required

Filterable The desired Kubernetes version for this Kubernetes cluster in the format of <major>.<minor>. The latest supported patch version is deployed.

string
required
length between 1 and 32

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.

node_pools
array of objects
required
node_pools*
string
required

Filterable This Kubernetes cluster's location.

string
enum
Defaults to ipv4

Beta, LKE Enterprise The networking stack type of the Kubernetes cluster. This specifies that the cluster is IPv4 only (default) or supports both IPv4 and IPv6 (dual-stack).

🚧

This field is available as part of the beta API and can only be used by accounts with access to LKE Enterprise. Call the URL with the apiVersion path parameter set to v4beta.

Allowed:
integer

Beta, LKE Enterprise The ID of the VPC subnet to use for the Kubernetes cluster. This subnet must have both IPv4 and IPv6 enabled (dual-stack). When this field is specified, the cluster is deployed to the given subnet and its corresponding VPC. To specify a VPC and have a subnet auto-allocated, use vpc_id instead. If subnet_id and vpc_id are both unspecified, a new VPC and subnet are auto-allocated for the cluster.

🚧

This field is available as part of the beta API and can only be used by accounts with access to LKE Enterprise. Call the URL with the apiVersion path parameter set to v4beta.

tags
array of strings

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

tags
string
enum

Beta, Filterable The desired Kubernetes tier, either standard or enterprise.

🚧

This field is available as part of the beta API. Call the URL with the apiVersion path parameter set to v4beta.

Allowed:
integer

Beta, LKE Enterprise The ID of the VPC to use for the Kubernetes cluster. An appropriately sized subnet is auto-allocated. To specify an existing subnet, use subnet_id instead. If subnet_id and vpc_id are both unspecified, a new VPC and subnet are auto-allocated for the cluster.

🚧

This field is available as part of the beta API and can only be used by accounts with access to LKE Enterprise. Call the URL with the apiVersion path parameter set to v4beta.

Responses

Language
Credentials
Response
Choose an example:
application/json