Prereqs: jq
Useful links: https://github.com/linode/linode-cli/wiki/Usage
pip3 install --upgrade linode-cli
~ % linode-cli configure
Welcome to the Linode CLI. This will walk you through some initial setup.
The CLI will use its web-based authentication to log you in.
If you prefer to supply a Personal Access Token,use `linode-cli configure --token`.
Press enter to continue. This will open a browser and proceed with authentication.
# Region/Cluster_Name/k8s version
export LINODE_REGION="fr-par"
export LKE_CLUSTER_NAME=sbenfred-lke-001
export K8S_VER="1.31"
# [optional]
# If a token is being used versus authentication
# export LINODE_TOKEN=xxx
# Create cluster with 3 nodes/no HA/shared CPU 16G (g6-standard-6)
linode-cli lke cluster-create --label $LKE_CLUSTER_NAME --tags TEST --region $LINODE_REGION --k8s_version $K8S_VER --node_pools.type g6-standard-6 --control_plane.high_availability false --control_plane.acl.enabled true --control_plane.acl.addresses.ipv4 "<myIP>/32" --node_pools.count 3
CLUSTER_ID=$(linode lke clusters-list --json | \
jq -r --arg lke_cluster_name "$LKE_CLUSTER_NAME" \
'.[] | select(.label == $lke_cluster_name) | .id')
linode lke kubeconfig-view --json "$CLUSTER_ID" | \
jq -r '.[0].kubeconfig' | \
base64 --decode > ~/myrepo/lke-kubeconfig.yaml
linode-cli volumes list
linode-cli volumes delete 7831513
linode-cli commands
CLI user management commands:
βββββββββββββββ¬βββββββββββ¬βββββββββββββ
β configure β set-user β show-users β
β remove-user β β β
βββββββββββββββ΄βββββββββββ΄βββββββββββββ
CLI Plugin management commands:
βββββββββββββββββββ¬ββββββββββββββββ
β register-plugin β remove-plugin β
βββββββββββββββββββ΄ββββββββββββββββ
Other CLI commands:
ββββββββββββββ
β completion β
ββββββββββββββ
Available commands:
βββββββββββββββββ¬βββββββββββββββββββββ¬ββββββββββββββββββββ
β account β betas β child-account β
β databases β domains β events β
β firewalls β images β kernels β
β linodes β lke β longview β
β managed β network-transfer β networking β
β nodebalancers β object-storage β payment-methods β
β phone β placement β profile β
β regions β security-questions β service-transfers β
β sshkeys β stackscripts β tags β
β tickets β users β vlans β
β volumes β vpcs β β
βββββββββββββββββ΄βββββββββββββββββββββ΄ββββββββββββββββββββ