LKE commands
Basic command examples
Here are some common tasks for your Linode Kubernetes Engine (LKE) clusters you can perform with the Linode CLI.
List clusters
Run this command to list all of the available Kubernetes clusters on your account:
linode-cli lke clusters-list
Create a Kubernetes cluster
The system creates the cluster asynchronously. You can use the events system to determine when the cluster is ready to use:
linode-cli lke cluster-create \
--label cluster12345 \
--region us-central \
--k8s_version 1.16 \
--node_pools.type g6-standard-4 --node_pools.count 6 \
--node_pools.type g6-standard-8 --node_pools.count 3 \
--tags ecomm
Update a Kubernetes cluster
linode-cli lke cluster-update $cluster_id \
--label lkecluster54321 \
--tags ecomm \
--tags blog \
--tags prod \
--tags monitoring
Delete a cluster
You needread_write permission to the target cluster.
linode-cli lke cluster-delete $cluster_id
List active node pools
Run this command to view all of the active nodes on a specific Kubernetes cluster:
linode-cli lke pools-list $cluster_id
Create a node pool
Run this command to create a new node pool on a specific Kubernetes cluster:
linode-cli lke pool-create $cluster_id \
--type g6-standard-4 \
--count 6
Update a node pool
Run this command to update a node pool in a specific Kubernetes cluster. When a node pool's count is changed, the system replaces the nodes in that pool in a rolling fashion.
linode-cli lke pool-update $cluster_id $pool_id \
--count 6
Delete a node pool
Run this command to delete a specific node pool from a specific Kubernetes cluster:
linode-cli lke pool-delete $cluster_id $pool_id
View the Kubeconfig file
Run this command to view the kubeconfig file on a specific Kubernetes cluster:
linode-cli lke kubeconfig-view $cluster_id
Other actions are available. Use linode-cli lke --help for a complete list.
Updated about 4 hours ago
