Global flags
Every vcluster command accepts these flags. Each command's reference page also lists them under Global and inherited flags.
| Flag | Default | What it does |
|---|---|---|
--config | ~/.vcluster/config.json | Path to the CLI config file, which stores settings such as the Platform login. The CLI creates the file the first time it saves a setting. |
--context | Current kubeconfig context | The kubeconfig context to run the command against. |
-n, --namespace | Depends on the command | Namespace in the control plane cluster that the command acts on. |
--debug | false | Turns on debug logging and prints the stack trace when a command fails. |
-s, --silent | false | Hides all log output except fatal errors. Takes precedence over --debug. |
--log-output | plain | Accepted by every command, but the current CLI doesn't apply it, so log output stays in the plain format. |
Examples​
Run a command against a specific kubeconfig context and namespace:
vcluster list --context my-control-plane-cluster --namespace team-a
Get more detail when a command fails:
vcluster connect my-cluster --debug
Keep a separate CLI config, for example to stay signed in to two Platform instances at once:
vcluster platform login https://platform.example.com --config ~/.vcluster/staging.json