Skip to main content

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:
FlagDescriptionDefault
--context stringThe kubernetes config context to useCurrent context
--namespace string, -nThe kubernetes namespace to usevcluster
--config stringPath to vcluster config file~/.vcluster/config.json
--debugEnable debug loggingfalse
--silentRun in silent modefalse

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 management
  • docker - Run vCluster locally in Docker
The driver can also be configured in the vCluster config file.

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

# Create and auto-connect
vcluster create my-vcluster -n team-x

# Create without connecting
vcluster create my-vcluster -n team-x --connect=false

# Connect later
vcluster connect my-vcluster -n team-x

Listing and Managing

# List all vclusters
vcluster list

# List in specific namespace
vcluster list -n team-x

# JSON output
vcluster list --output json

Cleanup

# Delete a vcluster
vcluster delete my-vcluster -n team-x

# Delete without confirmation
vcluster delete my-vcluster -n team-x --delete-namespace

Output Formats

Many commands support different output formats:
  • table (default) - Human-readable table format
  • json - JSON output for scripting
  • yaml - 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:
VariableDescription
KUBECONFIGPath to kubeconfig file
VCLUSTER_TELEMETRYDisable telemetry (false)

Getting Help

For detailed help on any command:
vcluster [command] --help

Next Steps

Create Command

Learn how to create virtual clusters with all available options

Configuration

Explore configuration options for customizing your virtual clusters

Build docs developers (and LLMs) love