Quick Start Guide
This guide walks through deploying a tenant cluster, running a workload against it, and understanding the core isolation model.
This guide deploys a tenant cluster using the Shared Nodes default, which is suitable for testing and development. For production GPU workloads, see Building a GPU cloud platform to choose the right deployment model for your use case.
How tenant clusters work
Before deploying a vCluster, it's important to understand the components of a tenant cluster and how they determine your isolation model.
- Control plane: Contains a Kubernetes API server, a controller manager, and a data store. Runs on the Control Plane Cluster but is completely invisible to tenants.
- Worker nodes: Worker nodes can be drawn from the Control Plane Cluster's node pool (shared nodes) or provisioned as dedicated private nodes.
Prerequisitesβ
Prerequisites depend on your deployment model. Pick your path before continuing.
- Kubernetes Cluster
- Docker (vind)
- kubectl
- Helm v3.10.0+
- Access to a Kubernetes v1.28+ cluster with permissions to deploy applications into a namespace. No cluster-admin or cluster-wide permissions are required. This cluster acts as the Control Plane Cluster for the tenant cluster deployment.
Deploy vClusterβ
Install the vCluster CLIβ
- Homebrew
- Mac (Intel/AMD)
- Mac (Silicon/ARM)
- Linux (AMD)
- Linux (ARM)
- Download Binary
- Windows Powershell
brew install loft-sh/tap/vcluster
The binaries in the tap are signed using the Sigstore framework for enhanced security.
curl -L -o vcluster "https://github.com/loft-sh/vcluster/releases/latest/download/vcluster-darwin-amd64" && sudo install -c -m 0755 vcluster /usr/local/bin && rm -f vcluster
curl -L -o vcluster "https://github.com/loft-sh/vcluster/releases/latest/download/vcluster-darwin-arm64" && sudo install -c -m 0755 vcluster /usr/local/bin && rm -f vcluster
curl -L -o vcluster "https://github.com/loft-sh/vcluster/releases/latest/download/vcluster-linux-amd64" && sudo install -c -m 0755 vcluster /usr/local/bin && rm -f vcluster
curl -L -o vcluster "https://github.com/loft-sh/vcluster/releases/latest/download/vcluster-linux-arm64" && sudo install -c -m 0755 vcluster /usr/local/bin && rm -f vcluster
Download the binary for your platform from the GitHub Releases page and add this binary to your $PATH.
md -Force "$Env:APPDATA\vcluster"; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls,Tls11,Tls12';
Invoke-WebRequest -URI "https://github.com/loft-sh/vcluster/releases/latest/download/vcluster-windows-amd64.exe" -o $Env:APPDATA\vcluster\vcluster.exe;
$env:Path += ";" + $Env:APPDATA + "\vcluster";
[Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::User);
You may need to reboot your computer to use the CLI due to changes to the PATH variable (see below).
Line 4 of this install script adds the install directory %APPDATA%\vcluster to the $PATHenvironment variable. This is only effective for the current Powershell session, i.e. when opening a new terminal window,vcluster may not be found.
Make sure to add the folder %APPDATA%\vcluster to the PATH environment variable after installing vcluster CLI via Powershell. Afterward, a reboot might be necessary.
Verify the CLI installed successfully.
vcluster --version
Output is similar to:
vCluster version 0.x.x
Deploy a tenant clusterβ
Deploying to an existing Kubernetes cluster? Use the Kubernetes tab. Testing locally without a cluster? Use Docker (vind) β no Kubernetes required.
- Kubernetes Cluster
- Docker (vind)
For this quickstart, you'll deploy a tenant cluster called my-vcluster to the namespace team-x on a Control Plane Cluster. This guide uses the vCluster CLI, but there are multiple ways to deploy vCluster using other tools like Helm, Terraform, ArgoCD, ClusterAPI, or similar. Read about the additional options in the deployment section of the docs.
(Optional) If you want to customize how vCluster deploiys, create a
vcluster.yaml. Various options can be configured before deploying your vCluster. Refer to thevcluster.yamlreference docs to explore all configuration options.Otherwise, continue without a
vcluster.yamlfile to deploy a vCluster with default options.vcluster.yaml configurationIf you aren't sure what options you want to configure, you can always upgrade your vCluster after deployment with an updated
vcluster.yamlto change your configuration. While most options can be configured later, some options can only be defined during the initial deployment. See pre-deployment configuration options for the full list.Deploy vCluster using the vCluster CLI. There are other methods to deploy vCluster, but this is the quickest way to get started.
- Default (No vcluster.yaml)
- With vcluster.yaml
vcluster create my-vcluster --namespace team-xInclude your
vcluster.yamlconfiguration file.vcluster create my-vcluster --namespace team-x --values vcluster.yamlWhen the tenant cluster deployment finishes, your kube context automatically updates to point to the tenant cluster. Check the namespaces to confirm.
kubectl get namespaces # See the namespaces of your tenant cluster
For this quickstart, you'll deploy a tenant cluster called my-vcluster using Docker containers. This creates a complete Kubernetes cluster without any external infrastructure.
Configure vCluster to use the Docker driver.
vcluster use driver docker(Optional) Create a
vcluster.yamlto customize your tenant cluster. Refer to the Docker configuration docs for Docker-specific options, or the vcluster.yaml reference for all configuration options.vcluster.yaml configurationIf you aren't sure what options you want to configure, you can always upgrade your vCluster after deployment with an updated
vcluster.yaml. While most options can be configured later, the backing store can only be set during the initial deployment.Deploy vCluster using Docker containers.
- Default (No vcluster.yaml)
- With vcluster.yaml
vcluster create my-vclusterInclude your
vcluster.yamlconfiguration file.vcluster create my-vcluster --values vcluster.yamlWhen the tenant cluster deployment finishes, your kube context automatically updates to the tenant cluster. Check the namespaces to confirm.
kubectl get namespaces # See the namespaces of your tenant cluster
Use your tenant clusterβ
Deploy a test workload and explore your running tenant cluster.
Deploy a test workloadβ
Deploy a namespace and workload to your tenant cluster. The next section shows how these resources relate to the Control Plane Cluster.
kubectl create namespace demo-nginx
kubectl create deployment nginx-deployment -n demo-nginx --image=nginx -r 2
Check that this deployment creates two pods inside the tenant cluster.
kubectl get pods -n demo-nginx
Output is similar to:
NAME READY STATUS RESTARTS AGE
nginx-deployment-6d6565499c-cbv4w 1/1 Running 0 2m
nginx-deployment-6d6565499c-s7g8z 1/1 Running 0 2m
Understand resource isolationβ
- Kubernetes Cluster
- Docker (vind)
This step shows the core isolation guarantee: most resources in your tenant cluster remain invisible on the Control Plane Cluster. Only the pods required for scheduling are synced across.
To verify this, perform these steps:
Switch your kube context from the tenant cluster back to the Control Plane Cluster by disconnecting.
vcluster disconnectCheck the namespaces on the Control Plane Cluster to confirm you are in the correct kube context.
kubectl get namespacesOutput is similar to:
NAME STATUS AGE
default Active 35m
kube-public Active 35m
kube-system Active 35m
team-x Active 30mLook at the deployments in the
team-xnamespace to verifynginx-deploymentwas not synced to the Control Plane Cluster.kubectl get deployments -n team-xThis
deploymentresource does not exist on the Control Plane Cluster. By default, Deployments are not synced from the tenant cluster to the Control Plane Cluster. Only the pods that need to be scheduled sync.Now look for the NGINX pods on the Control Plane Cluster.
kubectl get pods -n team-xOutput is similar to:
coredns-cb5ccc67f-kqwmx-x-kube-system-x-my-vcluster 1/1 Running 0 34m
my-vcluster-0 1/1 Running 0 34m
nginx-deployment-6d6565499c-cbv4w-x-demo-nginx-x-my-vcluster 1/1 Running 0 20m
nginx-deployment-6d6565499c-s7g8z-x-demo-nginx-x-my-vcluster 1/1 Running 0 20mThe two NGINX pods exist on the Control Plane Cluster. vCluster rewrites pod names and namespaces during the sync process to prevent collisions.
How vCluster stores state (StatefulSet vs Deployment)
The
my-vcluster-0pod is the vCluster control plane.vCluster deploys as a StatefulSet when it needs local persistent storage. The StatefulSet provides stable pod identities and a persistent volume for Kine, vCluster's internal data store, which uses an embedded SQLite database (
state.db).When you configure an external database, vCluster deploys as a Deployment instead.
By default, vCluster does not persist data outside of its pods. Deleting a vCluster pod without persistent storage causes data loss. Configure an external backing store to persist data outside the pod.
Docker-based tenant clusters are fully self-contained. All resources exist within the Docker containers β no Control Plane Cluster required.
Check the Docker containers running for your tenant cluster.
docker ps --filter name=my-vclusterOutput is similar to:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a1b2c3d4e5f6 ghcr.io/loft-sh/vm... "/usr/bin/supervisorβ¦" 10 minutes ago Up 10 minutes ... vcluster.cp.my-vcluster
b2c3d4e5f6a1 ghcr.io/loft-sh/vm... "/usr/bin/supervisorβ¦" 10 minutes ago Up 10 minutes ... vcluster.node.my-vcluster.worker-1Inspect the Docker network created for your tenant cluster.
docker network inspect vcluster.my-vclusterView logs from the containers if you need to troubleshoot.
# View control plane logs
docker exec -it vcluster.cp.my-vcluster journalctl -u vcluster --no-pager
# View kubelet logs
docker exec -it vcluster.node.my-vcluster.my-node journalctl -u kubelet --no-pager
# View containerd logs
docker exec -it vcluster.node.my-vcluster.my-node journalctl -u containerd --no-pager
Common configuration patternsβ
Each example below shows a common configuration pattern. Apply any of them by modifying vcluster.yaml and redeploying. See the vcluster.yaml reference for the full list of options.
Expose the vCluster control plane
There are multiple ways of granting access to the vCluster control plane for external applications like kubectl. The following example uses an Ingress, but you can also do it with ServiceAccount, LoadBalancer, and NodePort.
Modify
vcluster.yamlso that vCluster creates the required Ingress resource.vcluster.yaml ingress configurationcontrolPlane:
ingress:
enabled: true
host: $VCLUSTER_HOSTNAME
proxy:
extraSANs:
- $VCLUSTER_HOSTNAMEReplace
$VCLUSTER_HOSTNAMEwith the hostname of the vCluster instance.Apply your changes.
vcluster create --upgrade my-vcluster -n team-x -f vcluster.yaml
Show real nodes
By default, vCluster syncs pseudo nodesPseudo NodesThe default node representation in a tenant cluster. vCluster creates pseudo nodes for each host node that has pods scheduled on it. Pseudo nodes have real values for name, CPU, architecture, and operating system, but all other fields are randomly generated. When no pods remain on a host node, vCluster deletes the corresponding pseudo node. from the Control Plane Cluster to the tenant cluster. However, deploying a vCluster instance with the CLI on a local Kubernetes cluster automatically enables real node syncing, so you would not see a difference in this context.
Pseudo nodes only have real values for the CPU, architecture, and operating system, while everything else is randomly generated. Therefore, for use cases requiring real node information, you can opt to sync the real nodes into the tenant cluster.
Modify
vcluster.yamlto sync the Nodes from the Control Plane Cluster to the tenant cluster.vcluster.yaml node sync configurationsync:
fromHost:
nodes:
enabled: trueApply your changes.
vcluster create --upgrade my-vcluster -n team-x -f vcluster.yaml
Sync Ingress classes from the Control Plane Cluster to the tenant cluster
If you want to use an Ingress controller from the Control Plane Cluster inside your tenant cluster by syncing Ingress resources from the tenant cluster to the Control Plane Cluster, and allow the Control Plane Cluster IngressClasses to be viewable, enable IngressClass syncing from the Control Plane Cluster to the tenant cluster.
Modify
vcluster.yamlto sync the IngressClasses from the Control Plane Cluster to the tenant cluster.vcluster.yaml ingress class sync configurationsync:
fromHost:
ingressClasses:
enabled: trueApply your changes.
vcluster create --upgrade my-vcluster -n team-x -f vcluster.yaml
Sync Ingress from the tenant cluster to the Control Plane Cluster
Create an Ingress in a tenant cluster to make a service in that tenant cluster available from a hostname/domain. Instead of having to run a separate Ingress controller in each tenant cluster, sync the Ingress resource to the Control Plane Cluster so that the tenant cluster can use a shared Ingress controller running in the Control Plane Cluster.
Modify
vcluster.yamlto sync the Ingresses from the tenant cluster to the Control Plane Cluster.sync:
toHost:
ingresses:
enabled: trueApply your changes.
vcluster create --upgrade my-vcluster -n team-x -f vcluster.yaml
Sync Services from the Control Plane Cluster to the tenant cluster
In this example, you map a Service my-host-service in the namespace my-host-namespace to the tenant cluster Service my-virtual-service inside the tenant cluster namespace team-x.
Modify
vcluster.yamlto sync the Services from the Control Plane Cluster to the tenant cluster.replicateServices:
fromHost:
- from: my-host-namespace/my-host-service
to: team-x/my-virtual-serviceApply your changes.
vcluster create --upgrade my-vcluster -n team-x -f vcluster.yaml
Delete a tenant clusterβ
Deleting a tenant cluster deletes all resources within the cluster and all associated state. This cannot be undone.
- Kubernetes Cluster
- Docker (vind)
If the namespace on the Control Plane Cluster was created by the vCluster CLI, then that namespace is also deleted.
vcluster delete my-vcluster --namespace team-x
For Docker deployments, this removes all Docker containers and networks created for the tenant cluster.
vcluster delete my-vcluster
Next stepsβ
- Kubernetes Cluster
- Docker (vind)
- Architecture β understand control plane and worker node deployment models
- Private nodes β dedicated infrastructure for GPU tenants and regulated workloads
- Production deployment β deploy with Helm, Terraform, or ArgoCD
- vcluster.yaml reference β full configuration reference
- Docker configuration β ports, volumes, multi-node setups
- vcluster.yaml reference β full configuration reference
- Deploy to Kubernetes β when you're ready to move beyond local development