Prerequisites
- Python 3.x and
pip3installed - A Linode API Token with Read/Write access (create one in the Linode Cloud Manager)
Make sure your API token includes
lke:read_write scopes to manage clusters.1. Install the Linode CLI
- Verify
pip3is available: - Install the Linode CLI package:
- Confirm the installation:
2. Configure the CLI
Authenticate the CLI with your token:--token, the CLI launches a browser flow to log in and prompts for region and default Linode type.
3. List Your LKE Clusters
Retrieve all existing Kubernetes clusters on your account:[].
4. Create a New LKE Cluster
Uselinode-cli lke clusters-create with the following flags:
Example command:
If you see an error like
Must be unique, update --label to a name not already in use.5. Delete an LKE Cluster
When you no longer need a cluster, remove it with:Deleting a cluster is irreversible and will remove all associated resources.