LinuxCommandLibrary

linode-cli-lke

Manage Linode Kubernetes Engine (LKE) clusters

TLDR

List all LKE clusters

$ linode-cli lke clusters list
copy

Create a new LKE cluster
$ linode-cli lke clusters create --region [region] --type [type] --node-type [node_type] --nodes-count [count]
copy

View details of a specific LKE cluster
$ linode-cli lke clusters view [cluster_id]
copy

Update an existing LKE cluster
$ linode-cli lke clusters update [cluster_id] --node-type [new_node_type]
copy

Delete an LKE cluster
$ linode-cli lke clusters delete [cluster_id]
copy

SYNOPSIS

linode-cli lke [<action>] [<action-options>]
Actions: create, delete <id>, kubeconfig <id> [--file], list, node-pools [<subaction>] <id>, update <id>, view <id>

PARAMETERS

-h, --help
    Display help for the command

--version
    Show linode-cli version

--debug
    Enable debug output

--json
    Format output as JSON

--text
    Format output as plain text (default)

--yaml
    Format output as YAML

--no-header
    Omit table headers in text output

--delimiter DELIM
    Custom delimiter for text fields

--page PAGE
    Specify page number for results

--page-size SIZE
    Items per page (default 20, max 100)

--label LABEL (create/update)
    Cluster display label

--region REGION (create)
    Datacenter region (e.g., us-central)

--k8s_version VERSION (create)
    Kubernetes version (e.g., 1.28)

--tags TAGS (create/update)
    Comma-separated cluster tags

--pools POOLS_JSON (create/node-pools)
    Node pools as JSON array (e.g., '[{"type":"g6-standard-2","count":3}]')

--file FILE (kubeconfig)
    Output kubeconfig to file

DESCRIPTION

The linode-cli lke subcommand is a component of the official Linode CLI tool, enabling seamless management of Linode Kubernetes Engine (LKE) clusters from the Linux command line. LKE provides a managed Kubernetes service on Linode's cloud platform, handling control plane maintenance, upgrades, and high availability so users focus on applications.

Core operations include creating clusters with custom labels, regions, Kubernetes versions (e.g., 1.28+), tags, and node pools defined via JSON; listing all clusters with pagination; viewing cluster details including status and endpoints; updating labels or tags; deleting clusters; generating kubeconfig files for kubectl integration; and handling node pools (list, add, remove, resize).

Authentication uses a Linode API v4 personal access token, configured via linode-cli configure. Outputs support JSON, YAML, or text formats for automation in scripts or CI/CD pipelines. Pagination aids large accounts, and debug mode assists troubleshooting.

Ideal for developers, sysadmins, and teams deploying containerized workloads, it streamlines provisioning without web console dependency. Note regional availability for K8s versions and node types (e.g., g6-standard). Pricing is based on nodes and control plane.

CAVEATS

Requires configured API token via linode-cli configure. Not all K8s versions or node types available in every region. Cluster creation is asynchronous; use view to check status. Node pool changes may cause downtime.

AUTHENTICATION SETUP

Run linode-cli configure and provide your API token with linodes:read_write and lke:read_write scopes.

CREATE EXAMPLE

linode-cli lke create --label mycluster --region us-central --k8s_version 1.28 --pools '[{"type":"g6-standard-2","count":3}]'

NODE POOLS SUBCOMMAND

Use linode-cli lke node-pools <clusterId> list|add|remove|resize for pool management.

HISTORY

Linode CLI launched in 2018; LKE support added in v5.10.0 (2020) post-LKE beta (Nov 2019). Ongoing updates align with Kubernetes releases and API v4 enhancements.

SEE ALSO

linode-cli(1), kubectl(1), linode-cli regions(1)

Copied to clipboard