Loft CLI to vCluster CLI Migration
This section provides an overview of loft CLI commands that have moved to vCluster CLI. Most commands should work exactly as before. Any commands that have been changed are documented in the "Comments" column.
Global --config flag​
Previously, loft CLI read its config file from ~/.loft/config.json
if nothing was specified under --config
. vCluster CLI now assumes the config to be per default in ~/.vcluster/config.json
.
Furthermore, the config format in vCluster CLI changed in a way that the loft platform (now vCluster platform) related configuration goes into a special section under the key platform
.
If you want you can convert your already existing loft configuration via the following (prerequisite: jq >= 1.7 installed):
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
Now you can pass this path to --config $CONFIG_PATH
or rely on vCluster CLI to use the default path ~/.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 --space (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 (vCluster platform handles this transparently in the background)--space (vCluster platform handles this transparently in the background)--delete-space (Please 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 (vCluster platform handles this transparently in the background)--space (vCluster platform handles this transparently 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, 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 Commands​
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 no longer has any use |
loft defaults set | - | Removed as it no longer has any use |
loft defaults view | - | Removed as it no longer has any use |
loft generate admin-kube-config | - | Removed due to egress agent change |
loft completion | - | Removed as it no longer has any use |
loft ui | - | Removed as it no longer has any use |