Synopsis
Creates a new virtual cluster inside a Kubernetes namespace.Description
Thecreate command deploys a new virtual Kubernetes cluster into a namespace of your host cluster. By default, it uses Helm to install the vCluster chart and automatically connects your kubectl context to the new virtual cluster.
Examples
Basic Usage
With Custom Configuration
Different Distributions
Common Flags
The Kubernetes namespace to create the vCluster in. The namespace will be created if it doesn’t exist.
If true, automatically updates your kubeconfig to connect to the new vCluster.
The driver to use for managing the vCluster. Options:
helm, platform, docker.The Kubernetes version to use for the virtual cluster (e.g.,
1.28, 1.29).Kubernetes distribution to use. Options:
k3s, k8s, k0s, eks.Helm Flags
Path to a values.yaml file to use for Helm installation.
Set values on the command line (can be specified multiple times).
The vCluster chart version to use.
The chart repository URL.
Path to a local chart directory to use instead of remote chart.
If true, upgrade the vCluster if it already exists.
Platform Flags
These flags are available when using--driver platform:
The vCluster Platform project to use.
The vCluster template to use.
Additional parameters for the template.
Advanced Flags
If enabled, the vCluster will be exposed via an ingress or load balancer.
If enabled, the vCluster will be directly accessible via port-forwarding.
Use external address for connecting instead of port-forwarding.
Complete Example
Here’s a complete example creating a production-ready vCluster:create-production.sh
production-values.yaml:
production-values.yaml
Output
When successful, the command outputs:Troubleshooting
Namespace already exists error
Namespace already exists error
If the namespace already exists, this is normal. vCluster will use the existing namespace.To avoid the message, create the namespace first:
Chart not found
Chart not found
If you see chart not found errors:
Connection timeout
Connection timeout
If the vCluster creates but connection times out:
See Also
- vcluster connect - Connect to an existing vCluster
- vcluster list - List all vClusters
- Configuration Reference - Helm values documentation