Manually configure a virtual cluster
Each virtual cluster belongs to a project. Projects control whether users can create virtual clusters with or without templates.
Who can create virtual clusters without a template​
By default, projects require templates for virtual cluster creation. This means:
- Project users can only create virtual clusters from allowed templates configured by the project admin.
- Project admins and platform admins can always create virtual clusters without a template, regardless of project settings.
If project admins disable the requireTemplate setting, project users can also create virtual clusters without templates. Keep this setting enabled in production environments to maintain security controls.
Create without template​
Creating virtual clusters without a template bypasses the security controls that templates provide. Users with this capability can configure any vCluster settings, including sync configurations that could grant elevated access to host cluster resources.
For production environments:
- Keep templates required for all projects (the default
requireTemplatesetting) - Grant project admin roles only to users who need to create virtual clusters without templates
- Control who can create projects, since project creators become project admins. See project membership for details on project roles
- Use hardened templates to control which resources can be synced to and from the host cluster
- Form
- YAML
From the project drop-down menu (top left corner), select the project you'd like to create the virtual cluster in.
Click on Virtual Clusters.
Click the button.
In the popup, confirm that the virtual cluster template field is empty.
[Optional] Select the cluster in which to create the virtual cluster.
[Optional] Add a name for your virtual cluster.
Click the to continue.
In the drawer that appears from the right, update the virtual cluster with any additional desired configuration options.
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), as well as configurations for sleep mode and ingress access.
Objects is where you can define Kubernetes manifests that should be created in the virtual cluster.
Apps allows you to select any pre-defined 'applications' (e.g. Cert Manager) that should be installed into the virtual cluster.
Permissions are additional access rules that can be defined for the virtual cluster instance.
Advanced Options allow for advanced configuration different resources.
tipAll configuration options in a vCluster defined in the
vcluster.yamlcan be manually configured when creating any virtual cluster. Read more about thevcluster.yamlconfiguration options.Click the button.
Retrieve a kube-context for a virtual cluster using the CLI:
vcluster connect [vcluster-name] --project [project-name] --driver platform
From the project drop-down menu (top left corner), select the project you'd like to create the virtual cluster in.
Click on Virtual Clusters.
Click the button.
In the popup, confirm that the virtual cluster template field is empty.
[Optional] Select the cluster in which to create the virtual cluster.
[Optional] Add a name for your virtual cluster.
Click the to continue.
In the drawer that appears from the right, click the Show YAML at the bottom left corner of the drawer.
Configure your virtual cluster with options in the
valuessection. Read more about what values can be used as it is the equivalent of the vcluster.yaml.Click the button.
Retrieve a kube-context for a virtual cluster using the CLI:
vcluster connect [vcluster-name] --project [project-name] --driver platform
The platform uses Helm to manage virtual clusters. If your cluster is running in an air-gapped environment, you may host Helm charts in an OCI compatible private registry. To use a private registry for virtual clusters there are several configuration options:
- Configure the platform for offline Helm charts
- Configure the Helm chart repository and authentication for each virtual cluster.
- Configure the Helm chart repository and authentication using virtual cluster templates.