Skip to main content
Version: main 🚧

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. Futhermore, 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 CLIvCluster CLIAliasComments
loft create vclustervcluster create --driver=platformvcluster platform create vclusterFollowing 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 vclustervcluster delete --driver=platformvcluster platform delete vclusterFollowing 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 vclustervcluster platform add vcluster
loft list vclustersvcluster list --driver=platformvcluster platform list vclusters
loft share vclustervcluster platform share vcluster
loft sleep vclustervcluster sleep --driver=platformvcluster platform sleep vcluster
vcluster pause --driver=platform
loft use vclustervcluster connect --driver=platformvcluster platform connect vclusterFollowing 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 vclustervcluster wakeup --driver=platformvcluster platform wakeup vcluster
vcluster resume --driver=platform

Namespace Commands​

loft CLIvCluster CLIComments
loft create spacevcluster platform create namespaceFollowing flags have been changed:
--version was renamed to --template-version
loft delete spacevcluster platform delete namespace
loft import space-Removed as it was unused
loft list spacesvcluster platform list namespaces
loft share spacevcluster platform share namespace
loft sleep spacevcluster platform sleep namespace
loft use spacevcluster platform connect namespace
loft wakeup spacevcluster platform wakeup namespace

Cluster Commands​

loft CLIvCluster CLI
loft connect clustervcluster platform add cluster
loft list clustersvcluster platform list clusters
loft use clustervcluster platform connect cluster
loft vars clustervcluster platform get current-cluster -o name

Token, Secret, Password Commands​

loft CLIvCluster CLI
loft get cluster-access-keyvcluster platform get cluster-access-key
loft get secretvcluster platform get secret
loft set secretvcluster platform set secret
loft list secretsvcluster platform list secrets
loft reset passwordvcluster platform reset password
loft tokenvcluster platform access-key

User and Team Commands​

loft CLIvCluster CLI
loft get uservcluster platform get current-user
loft list teamsvcluster platform list teams
loft vars usernamevcluster platform get current-user -o name

Platform and Management Commands​

loft CLIvCluster CLI
loft startvcluster platform start
loft use managementvcluster platform connect management

Miscellaneous Commands​

loft CLIvCluster CLI
loft backupvcluster platform backup
loft creditsvcluster credits

Removed Commands​

loft CLIvCluster CLIComments
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