Skip to main content

Create Virtual Cluster

Each virtual cluster that is created in the platform belongs to a project. There are two primary ways which virtual clusters can be created: from a template or manually.

Virtual clusters created from a template inherit all template settings. Standard project users (non project admins) are only allowed to create virtual clusters from templates that the project admin has allowed. This ensures that virtual clusters in each project adhere to the standards set by the project admin(s).

Project admins and platform admins can create virtual clusters manually, that is without a template.

Create From Template

Project members can create a new virtual cluster through the UI or CLI:

  1. From the project drop-down menu (top left corner), select the project you'd like to create the virtual cluster in.

  2. Click on Virtual Clusters.

  3. Click the button.

  4. In the pop-up box, select your template from the template drop down menu.

  5. [Optional] Select the cluster in which to create the virtual cluster.

  6. [Optional] Add a name for your virtual cluster.

  7. Click the to continue.

  8. Retrieve a kube-context for a virtual cluster using the CLI:

    vcluster connect [vcluster-name] --project [project-name] --driver platform
Template Version Strings

Regardless of how you create a virtual cluster from a template, either by the UI or the CLI, you will be prompted to provide a template version string. If you do not provide this string, the latest version will be automatically selected for you. If you do provide the string though, you can do something very neat -- you can set any of the MAJOR, MINOR, PATCH version components to an X wildcard character. This allows the virtual cluster to be automatically updated to a more recent template version that matches your provided template string.

For example, given a template with a version of 1.0.0, and a virtual cluster created from this template with a version string "1.X.X". Adding a new template version "1.1.0", will cause this virtual cluster to be automatically updated. Whereas adding a new version "2.0.0", will not cause the virtual cluster to be upgraded.

This is a very handy way to keep virtual clusters up to date with the latest templates without having to manually upgrade them!

Note that you can even set the version to "X.X.X" to always have your virtual cluster updated to the latest template version!

Create Without Template

Only project admins or platform admins can create a virtual cluster without a template:

  1. From the project drop-down menu (top left corner), select the project you'd like to create the virtual cluster in.

  2. Click on Virtual Clusters.

  3. Click the button.

  4. In the popup, confirm that the virtual cluster template field is empty.

  5. [Optional] Select the cluster in which to create the virtual cluster.

  6. [Optional] Add a name for your virtual cluster.

  7. Click the to continue.

  8. In the drawer that appears from the right, update the virtual cluster with any additional desired configuration options.

    1. The Definition tab contains settings relating to the virtual cluster deployment itself, here you can provide Helm values to be used when deploying the virtual cluster, select the virtual cluster distribution (e.g. k8s (default), k3s, k0s), as well as configurations for sleep mode and ingress access.

    2. Objects is where you can define Kubernetes manifests that should be created in the virtual cluster.

    3. Apps allows you to select any pre-defined 'applications' (e.g. Cert Manager) that should be installed into the virtual cluster.

    4. Permissions are additional access rules that can be defined for the virtual cluster instance.

    5. Advanced Options allow for advanced configuration different resources.

    tip

    All configuration options in a vCluster defined in the vcluster.yaml can be manually configured when creating any virtual cluster. Read more about the vcluster.yaml configuration options.

  9. Click the button.

  10. Retrieve a kube-context for a virtual cluster using the CLI:

    vcluster connect [vcluster-name] --project [project-name] --driver platform