Introduction
The vCluster CLI (vcluster) is the primary tool for managing virtual Kubernetes clusters. It provides commands for creating, connecting to, managing, and deleting virtual clusters.
Installation
See the Installation Guide for detailed installation instructions.Global Flags
All vCluster commands support the following global flags:| Flag | Description | Default |
|---|---|---|
--context string | The kubernetes config context to use | Current context |
--namespace string, -n | The kubernetes namespace to use | vcluster |
--config string | Path to vcluster config file | ~/.vcluster/config.json |
--debug | Enable debug logging | false |
--silent | Run in silent mode | false |
Driver Selection
Many commands support a--driver flag to specify how to manage the virtual cluster:
helm- Manage vCluster using Helm (default)platform- Use vCluster Platform for managementdocker- Run vCluster locally in Docker
Core Commands
Here’s a quick overview of the main vCluster commands:create
Create a new virtual cluster
connect
Connect to an existing virtual cluster
list
List all virtual clusters
delete
Delete a virtual cluster
pause
Pause a running virtual cluster
resume
Resume a paused virtual cluster
upgrade
Upgrade vCluster components
snapshot
Create and manage snapshots
Management Commands
describe
Describe a virtual cluster
info
Show CLI information
node
Manage virtual cluster nodes
token
Manage authentication tokens
debug
Debug virtual cluster issues
restore
Restore from a snapshot
Common Workflows
Creating and Connecting
Listing and Managing
Cleanup
Output Formats
Many commands support different output formats:table(default) - Human-readable table formatjson- JSON output for scriptingyaml- YAML output
Exit Codes
The vCluster CLI uses standard exit codes:- 0 - Success
- 1 - General error
- 2 - Command-line usage error
Environment Variables
The CLI respects these environment variables:| Variable | Description |
|---|---|
KUBECONFIG | Path to kubeconfig file |
VCLUSTER_TELEMETRY | Disable telemetry (false) |
Getting Help
For detailed help on any command:Next Steps
Create Command
Learn how to create virtual clusters with all available options
Configuration
Explore configuration options for customizing your virtual clusters