vCluster — Virtual Kubernetes Clusters Inside Real Clusters
vCluster creates lightweight virtual Kubernetes clusters that run inside namespaces of a host cluster, giving teams isolated environments without the cost and complexity of separate physical clusters.
Review-first install path
This asset needs a review step. The copied prompt tells the agent to dry-run, show the writes, then proceed only after confirmation.
npx -y tokrepo@latest install f23363bd-3942-11f1-9bc6-00163e2b0d79 --target codexDry-run first, confirm the writes, then run this command.
What it is
vCluster creates lightweight virtual Kubernetes clusters that run inside namespaces of a host cluster. Each virtual cluster has its own API server, control plane, and resource isolation, but shares the underlying host cluster's compute nodes. This gives teams their own Kubernetes environment without the cost of provisioning separate physical clusters.
It targets platform teams, DevOps engineers, and organizations that need to provide isolated Kubernetes environments for development, testing, or multi-tenancy without multiplying infrastructure costs.
How it saves time or tokens
Provisioning a full Kubernetes cluster takes minutes to hours and costs real money. vCluster creates a virtual cluster in seconds using existing host resources. Teams get full admin access to their virtual cluster without risk to the host. Spinning up and tearing down environments for CI pipelines, feature branches, or experimentation becomes nearly free.
How to use
- Install the vCluster CLI:
brew install loft-sh/tap/vclusteror download from the releases page. - Create a virtual cluster:
vcluster create my-vcluster --namespace team-a. - Connect to it:
vcluster connect my-vcluster --namespace team-a— your kubeconfig switches to the virtual cluster.
Example
# Create a virtual cluster for a feature branch
vcluster create feature-xyz --namespace dev
# Your kubectl now targets the virtual cluster
kubectl get nodes
# Shows synced nodes from host cluster
# Deploy and test in isolation
kubectl apply -f deployment.yaml
kubectl get pods
# Tear down when done
vcluster delete feature-xyz --namespace dev
Related on TokRepo
- DevOps tools — Infrastructure automation and Kubernetes tooling
- Self-hosted tools — Run services on your own infrastructure
Common pitfalls
- Virtual clusters share host cluster compute. Resource-heavy workloads in one vCluster can starve others. Use resource quotas on the host namespace.
- Not all Kubernetes features work identically in virtual clusters. Node-level resources (DaemonSets, host networking) behave differently because the virtual cluster does not own physical nodes.
- Networking between virtual clusters requires explicit configuration. By default, services in one vCluster are not reachable from another.
Frequently Asked Questions
Namespaces provide resource grouping within a single cluster but share the same API server, RBAC policies, and CRDs. vCluster gives each team a full Kubernetes API server with independent RBAC, CRDs, and control plane, while still running on shared host infrastructure. It provides stronger isolation than namespaces.
Yes. Each virtual cluster has its own API server, so you can install CRDs without affecting the host cluster or other virtual clusters. This is a major advantage over namespace-based isolation where CRDs are cluster-scoped.
A vCluster control plane (API server + etcd/SQLite + syncer) uses roughly 256MB-512MB RAM. This is significantly less than a full Kubernetes cluster. The workloads themselves use the same resources they would in a real cluster.
Yes. vCluster syncs PersistentVolumeClaim requests to the host cluster's storage provisioner. Storage classes available on the host are accessible from the virtual cluster. Data persists as long as the host PV exists.
Yes. vCluster is used in production for multi-tenant platforms where each tenant gets an isolated Kubernetes environment. Combined with network policies and resource quotas on the host, it provides a practical multi-tenancy model without dedicated clusters per tenant.
Citations (3)
- vCluster GitHub Repository— vCluster creates virtual Kubernetes clusters inside host namespaces
- vCluster Official Documentation— vCluster architecture and design
- Kubernetes Multi-tenancy Docs— Kubernetes multi-tenancy approaches
Related on TokRepo
Discussion
Related Assets
Kubernetes Dashboard — Official Web UI for Kubernetes Clusters
Kubernetes Dashboard is the official general-purpose web-based UI for managing Kubernetes clusters, allowing you to deploy, troubleshoot, and manage containerized applications and cluster resources.
KubeVirt — Run Virtual Machines on Kubernetes
KubeVirt extends Kubernetes with VM-native workloads. It lets you declare, schedule and manage traditional virtual machines as first-class Kubernetes objects alongside containers, sharing the same networking and storage.
Virtual Kubelet — Run Kubernetes Pods on Serverless and External Backends
Virtual Kubelet implements the Kubernetes kubelet interface as a pluggable provider, allowing pods to be scheduled onto serverless platforms, IoT edge nodes, or any non-traditional compute backend.
Sonobuoy — Kubernetes Cluster Diagnostics & Conformance Testing
A diagnostic tool that runs Kubernetes conformance tests and custom plugins to validate cluster health. Sonobuoy provides a non-destructive way to certify that clusters meet the Kubernetes specification and organizational standards.