v0.20 CLI Updates
With the breaking changes introduced in v0.20, the vCluster CLI was also updated to match with the direction that we are going.
There were also two signicant CLI changes that influenced the changes in the vcluster CLI.
- The
loftCLI, which was used to manage the platform (formerly known as loft) was deprecated and no longer supported, so all commands in theloftCLI were moved into thevclusterCLI. - The
vcluster procommand was renamed tovcluster platform.
With these two signifcant changes, there were duplicate functionality from the older CLI (loft) and vCluster command (vcluster pro) that were merged as vcluster platform.
New Commands in v0.20.0​
-
vcluster convert: Convert virtual cluster config values - This command is used to convert pre-v0.20 values.yaml files to the new vcluster.yaml format. More details on how to convert your pre v0.20values.yamlcan be found in our dedicated migration guide. -
vcluster set: Set configuration -
vcluster use: vCluster use subcommand - This command allows you to switch between the drivers (helm or platform).
Renamed Commands from vCluster CLI v0.19.x​
-
vcluster importwas renamed tovcluster platform add: Adds a cluster or vCluster to vCluster platform -
vcluster getwas renamed tovcluster platform get: Retrieves and displays information
New Commands that were used in vcluster pro and loft​
-
loft creditswas renamed tovcluster credits: Saves the OSS credits -
loft generatewas replaced withvcluster platform createandvcluster platform set -
loft importwas renamed tovcluster platform add: Adds a cluster or vCluster` to vCluster platform
Changed Subcommands​
-
vcluster pro token/loft tokenwas renamed toÂvcluster platform access-key -
vcluster pro connectwas renamed toÂvcluster platform connectwith additional context. -
vcluster pro generatewas removed and replaced withvcluster platform createandvcluster platform set
Renamed Commands from loft CLI to vcluster platform CLI​
This is a list of commands that formerly in the loft CLI and now renamed in vcluster under vcluster platform. All funcationality remains the same.
-
vcluster platform backup: Backup subcommands -
vcluster platform connect: Connects a cluster to vCluster Platform. -
vcluster platform create: Creates vCluster platform resources -
vcluster platform delete: Deletes vCluster platform resources -
vcluster platform get: Retrieves and displays information -
vcluster platform list: Lists configuration -
vcluster platform reset: Reset configuration -
vcluster platform set: Set configuration -
vcluster platform share: Shares a virtual cluster/namespace with another vCluster platform user or team -
vcluster platform sleep: Put a virtual cluster/namespace to sleep -
vcluster platform start: Start a loft instance and connect via port-forwarding -
vcluster platform wakeup: Wake up a virtual cluster/namespace
Flag Differences​
New Global Flag​
• --config string : The vcluster CLI config to use (will be created if it does not exist)
New Flags within Each Command​
vcluster connect
--driverstring : Specifies the driver to use for managing the virtual cluster (helm or platform).
vcluster create
-
--add: Automatically adds the virtual cluster to the current vCluster platform when using the helm driver (default true). -
--background-proxy: Uses a background-proxy to access the vCluster if docker is installed and reachable (default true). -
--create-context: Creates a kube context for the namespace (default true). -
--descriptionstring : Description to show in the platform UI for this virtual cluster. -
--display-namestring : Display name to show in the platform UI for this virtual cluster. -
--driverstring : Specifies the driver to use for managing the virtual cluster (helm or platform). -
--parametersstring : Uses a file for the parameters if a template is used. -
--print: Prints the context to the console if enabled. -
--recreate: Deletes an existing virtual cluster with the same name before creating a new one. -
--set-parameterstringArray : Sets specific parameters if a template is used. -
--skip-wait: Does not wait until the virtual cluster is running if true. -
--switch-context: Switches the current context to the new context (default true). -
--teamstring : Specifies the team to create the namespace for. -
--use: Uses the virtual cluster if it's already there. -
--userstring : Specifies the user to create the namespace for.Â
vcluster delete
-
--delete-context: Deletes the corresponding kube context if there is any (default true). -
--driverstring : Specifies the driver to use for managing the virtual cluster (helm or platform).
vcluster list
--driverstring : Specifies the driver to use for managing the virtual cluster (helm or platform).
vcluster platform loginÂ
--use-driverstring : Switches the vCluster driver between platform and helm.Â
vcluster pause
--driverstring : Specifies the driver for the virtual cluster (helm or platform).
vcluster resume:
--driverstring : Specifies the driver for the virtual cluster (helm or platform). Â
Dropped Flags within Each Command​
vcluster connect
-
--kube-configstring: This flag was used to specify the file to write the created kube config to. The default value was "./kubeconfig.yaml". -
--kube-config-context-namestring: This flag was used to override the context name of the generated virtual cluster kube config with a specified name. -
--update-current: This flag was used to update the current kube config if set to true. The default value was true.Â
vcluster create
-
--disable-pro: This flag was used to prevent vcluster from trying to create a vCluster.Pro. It could also be used with 'vcluster logout' to prevent vCluster from creating any pro clusters. In v0.20.0, the images used are the pro images and in order to use the OSS images, you'll need to replace the images as part of the vcluster.yaml. -
--distrostring: This flag was used to specify the Kubernetes distro to use for the virtual cluster. Allowed distros were k3s, k0s, k8s, eks, with the default being "k3s". In v0.20.0, configuring the distro is now in the vcluster.yaml with the default being "k8s". -
--extra-valuesstrings: This flag was deprecated and used to specify extra values. It was replaced by the --values flag. -
--isolate: This flag was used to run vcluster and its workloads in an isolated environment. In v0.20.0, running workloads in an isolated environment is configured within vcluster.yaml. -
--paramsstring: This flag was used to specify a file for the parameters if a template was used. It was replaced by the --parameters string flag.