linode-cli-lke
Manage Linode Kubernetes Engine (LKE) clusters
TLDR
List all LKE clusters
Create a new LKE cluster
View details of a specific LKE cluster
Update an existing LKE cluster
Delete an LKE cluster
SYNOPSIS
linode-cli lke <subcommand> [options]
Examples:
linode-cli lke cluster-list
linode-cli lke cluster-create --label my-cluster --region us-east --k8s_version 1.27 --node_pools '[{"type":"g6-standard-1","count":2}]'
linode-cli lke cluster-view <cluster_id>
linode-cli lke cluster-kubeconfig-view <cluster_id>
PARAMETERS
cluster-list
Lists all LKE clusters associated with your Linode account.
cluster-view <cluster_id>
Displays detailed information about a specific LKE cluster identified by its ID.
cluster-create
Creates a new LKE cluster. Requires options like --label, --region, --k8s_version, and --node_pools (a JSON array of node pool configurations).
cluster-update <cluster_id>
Modifies an existing LKE cluster, for example, updating its Kubernetes version or adding tags.
cluster-delete <cluster_id>
Permanently deletes an LKE cluster and all its associated resources.
cluster-kubeconfig-view <cluster_id>
Retrieves the Kubeconfig file content for a specified LKE cluster, enabling kubectl access.
node-pool-create <cluster_id>
Adds a new node pool to an existing LKE cluster.
node-pool-delete <cluster_id> <node_pool_id>
Deletes a specific node pool from an LKE cluster.
--text
(Global linode-cli option) Displays output in a human-readable, plain text table format. This is often the default.
--json
(Global linode-cli option) Displays output in a machine-readable JSON format, ideal for scripting.
--format <columns>
(Global linode-cli option) Specifies which columns to display in text/CSV output, e.g., --format id,label,region.
DESCRIPTION
linode-cli lke is the subcommand of the Linode Command Line Interface (CLI) used to interact with and manage Linode Kubernetes Engine (LKE) clusters directly from your terminal.
It allows users to perform various operations such as listing, viewing, creating, updating, and deleting LKE clusters and their associated node pools. This tool streamlines the management of Kubernetes infrastructure hosted on Linode, providing a convenient way to automate tasks and integrate LKE management into scripts or CI/CD pipelines without needing to use the Linode Cloud Manager web interface. It leverages the Linode API to provide robust control over your Kubernetes resources.
CAVEATS
Requires a configured linode-cli (authenticated with a Linode API token).
Operations directly affect billing; creating clusters and node pools incurs costs.
Cluster and node pool operations can take a significant amount of time to complete.
Deletion of LKE clusters is irreversible and removes all associated data and resources.
The API token used must have appropriate read/write permissions for LKE resources.
AUTHENTICATION
The linode-cli lke command relies on a configured Linode API token. This token can be set up using linode-cli configure. It's crucial that the token has the necessary read/write permissions for LKE to perform management operations.
API RATE LIMITS
Like all Linode API interactions, commands executed via linode-cli lke are subject to API rate limits. Frequent or rapid automated calls might hit these limits, requiring careful design of automation scripts to include delays or retry mechanisms.
AUTOMATION POTENTIAL
The consistent JSON output (via the --json option) makes linode-cli lke particularly useful for scripting and integrating LKE management into CI/CD pipelines. This allows for automated provisioning, scaling, and tear-down of Kubernetes environments, enhancing infrastructure-as-code practices.
HISTORY
The linode-cli project itself has evolved over time, starting as a Python-based CLI. The Linode Kubernetes Engine (LKE) service was introduced by Linode, and subsequently, the lke subcommand was added to the linode-cli to provide programmatic access to LKE cluster management. Its development closely mirrors the feature additions and updates to the LKE service on the Linode platform, aiming to provide parity with the Cloud Manager's capabilities via the command line. It has been continuously updated to support new Kubernetes versions and LKE features.
SEE ALSO
linode-cli(1), kubectl(1), helm(1)