Skip to main content
Version: 2.0 (Latest)

Virtual Clusters

A virtual cluster is a fully functional Kubernetes cluster that runs inside the namespace of another Kubernetes cluster (host cluster). Virtual clusters are very useful if you are hitting the limits of namespaces and do not want to make special exceptions to the multi-tenancy configuration of the underlying cluster, e.g. a user needs their own CRD or user needs pods from 2 namespaces to communicate with each other but your standard NetworkPolicy does not allow this, then a virtual cluster may be perfect for this user.

Working with Virtual Clusters

Unlike "real" clusters, virtual clusters are much more lightweight and much faster to spin up and tear down again.

Create Virtual Clusters

To create a virtual cluster using Loft CLI, run:

loft create vcluster [vcluster-name]

Running loft create vcluster will automatically add a kube-context to your kube-config file, so you can immediately run kubectl commands right after creating a virtual cluster.

Delete Virtual Clusters
loft delete vcluster [vcluster-name]

Deleting virtual clusters with Loft CLI has the advantage that Loft CLI will also delete the kube-context for this virtual cluster from your local kube-config file to keep everything cleaned up.

List Virtual Clusters

Run this command using Loft CLI to get a list of all virtual clusters you have access to across all clusters:

loft list vclusters

If you want to retrieve a kube-context for any of your virtual clusters, run:

loft use vcluster [vcluster-name]
Control Access To Virtual Cluster

To give someone access to a virtual cluster using Loft CLI, run:

loft share vcluster [optional:name]


Virtual Cluster Template

JSONPath in VirtualCluster CRD:
 metadata.annotations[""] (type: string)



JSONPath in VirtualCluster CRD: (type: string)


JSONPath in VirtualCluster CRD:
 metadata.namespace (type: string)


JSONPath in VirtualCluster CRD:
 metadata.labels (type: map[string]string)


JSONPath in VirtualCluster CRD:
 metadata.annotations (type: map[string]string)

Advanced Options


JSONPath in VirtualCluster CRD:
 spec.helmRelease.chart.version (type: string)

Helm Values

JSONPath in VirtualCluster CRD:
 spec.helmRelease.values (type: {})


Namespaces For Apps

Access To Virtual Cluster

JSONPath in VirtualCluster CRD:
 spec.access (type: Access[])




APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:


Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:

object (io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta)

ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.

object (
object (
  • "apiVersion": "string",
  • "kind": "string",
  • "metadata": {
  • "spec": {
  • "status": {