Loft CLI to vCluster CLI Migration
This section provides an overview of loft
CLI commands that have migrated to the vcluster
CLI. Most commands behave as they did previously. Changes are noted in the "Comments" column.
Global --config flag​
The loft
CLI previously read its config file from ~/.loft/config.json
if you did not specify a --config
flag. The vcluster
CLI now defaults to ~/.vcluster/config.json
.
The vcluster
CLI also introduces a new config structure. Configuration related to the platform is now nested under the platform
key.
To migrate your existing loft
configuration to the vcluster
format (requires jq >= 1.7
):
CONFIG_PATH=/your/path/to/.loft/config.json
jq -n --rawfile loft_config $CONFIG_PATH '{platform: ($loft_config | fromjson)}' -c > /tmp/config.json
# Do this only if you want to use the new vCluster CLI default location
mkdir -p ~/.vcluster
CONFIG_PATH=~/.vcluster/config.json
mv /tmp/config.json $CONFIG_PATH
Specify the path with --config $CONFIG_PATH
, or allow vcluster
CLI to default to ~/.vcluster/config.json
.
Mapping of old loft
CLI commands to vcluster
CLI commands​
vCluster commands​
loft CLI | vCluster CLI | Alias | Comments |
---|---|---|---|
loft create vcluster | vcluster create --driver=platform | vcluster platform create vcluster | Following flags have been removed:--delete-after --disable-direct-cluster-endpoint --sleep-after --namespace (Please use --namespace instead)Following flags have been changed: --version was renamed to --template-version |
loft delete vcluster | vcluster delete --driver=platform | vcluster platform delete vcluster | Following flags have been removed:--cluster (The platform automatically handles this in the background.)--namespace (The platform automatically handles this in the background.)--delete-namespace (Use --delete-namespace ) |
loft import vcluster | vcluster platform add vcluster | ||
loft list vclusters | vcluster list --driver=platform | vcluster platform list vclusters | |
loft share vcluster | vcluster platform share vcluster | ||
loft sleep vcluster | vcluster sleep --driver=platform | vcluster platform sleep vcluster vcluster pause --driver=platform | |
loft use vcluster | vcluster connect --driver=platform | vcluster platform connect vcluster | Following flags have been removed:--cluster (The platform automatically handles this in the background.)--namespace (The platform automatically handles this in the background.)--skip-wait --disable-direct-cluster-endpoint To obtain the kube config for the given virtual cluster issue the following: vcluster connect myvcluster --print > /tmp/myvcluser-kube-config.yaml |
loft wakeup vcluster | vcluster wakeup --driver=platform | vcluster platform wakeup vcluster vcluster resume --driver=platform |
Namespace commands​
loft CLI | vCluster CLI | Comments |
---|---|---|
loft create space | vcluster platform create namespace | Following flags have been changed:--version was renamed to --template-version |
loft delete space | vcluster platform delete namespace | |
loft import space | - | Removed as it was unused |
loft list spaces | vcluster platform list namespaces | |
loft share space | vcluster platform share namespace | |
loft sleep space | vcluster platform sleep namespace | |
loft use space | vcluster platform connect namespace | |
loft wakeup space | vcluster platform wakeup namespace |
Cluster commands​
loft CLI | vCluster CLI |
---|---|
loft connect cluster | vcluster platform add cluster |
loft list clusters | vcluster platform list clusters |
loft use cluster | vcluster platform connect cluster |
loft vars cluster | vcluster platform get current-cluster -o name |
Token, secret, and password commands​
loft CLI | vCluster CLI |
---|---|
loft get cluster-access-key | vcluster platform get cluster-access-key |
loft get secret | vcluster platform get secret |
loft set secret | vcluster platform set secret |
loft list secrets | vcluster platform list secrets |
loft reset password | vcluster platform reset password |
loft token | vcluster platform access-key |
User and team commands​
loft CLI | vCluster CLI |
---|---|
loft get user | vcluster platform get current-user |
loft list teams | vcluster platform list teams |
loft vars username | vcluster platform get current-user -o name |
Platform and management commands​
loft CLI | vCluster CLI |
---|---|
loft start | vcluster platform start |
loft use management | vcluster platform connect management |
Miscellaneous cmmands​
loft CLI | vCluster CLI |
---|---|
loft backup | vcluster platform backup |
loft credits | vcluster credits |
Removed commands​
loft CLI | vCluster CLI | Comments |
---|---|---|
loft defaults get | - | Removed as it is no longer used. |
loft defaults set | - | Removed as it is no longer used. |
loft defaults view | - | Removed as it is no longer used. |
loft generate admin-kube-config | - | Removed as it is no longer used. |
loft completion | - | Removed as it is no longer used. |
loft ui | - | Removed as it is no longer used. |