Retrieve the deployed vCluster configuration
You can deploy vCluster using various tools including Helm charts, the vCluster CLI, ArgoCD, Flux, or other GitOps workflows. After deployment, you may need to inspect the actual configuration of a running vCluster instance when the original Helm values or deployment files are no longer available. This helps with debugging issues, understanding configuration drift, or replicating the setup in another environment.
The following methods provide different levels of detail depending on your deployment approach and available tools:
-
Helm (Recommended): Use when the vCluster is Helm-compatible (deployed with Helm or vCluster CLI) and structured output distinguishing custom and default values is needed. This method is also recommended when planning to replicate the deployment in another environment or when working with Helm-managed deployments and consistency is required.
-
vCluster CLI: Use when the complete effective configuration as vCluster interprets it is required or when troubleshooting vCluster-specific behavior or issues. This method is also helpful when the original deployment method is unknown or mixed, or when the most comprehensive view of the cluster state is needed.
-
kubectl: Use when vCluster CLI and Helm are not available in the environment or when working in a restricted environment with limited tool access. This method provides direct access to the raw internal configuration file when other methods are failing or when only kubectl access to the host cluster is available.
- Helm
- vCluster CLI
- kubectl
For Helm-managed deployments, you can retrieve the configuration values used during installation and upgrades.
Get user-defined values​
Use the following command to get only user-defined values:
The following command shows only the values you explicitly set.
helm get values my-vcluster -n vcluster-my-vcluster -o yaml
Get default and user-defined values​
Use the following command to get merged default and user values:
The following command provides the complete configuration including defaults that Helm applied to your deployment.
helm get values my-vcluster -n vcluster-my-vcluster -a -o yaml
The vCluster CLI provides a comprehensive view of your cluster configuration, showing both user-defined settings and applied defaults. Use the following command when you need the complete effective configuration that vCluster uses to manage your virtual cluster:
vcluster describe my-vcluster --namespace vcluster-my-vcluster -o yaml
When you don't have access to the vCluster CLI or Helm, you can read the configuration directly from the running vCluster pod. The following method accesses the actual configuration file that vCluster uses internally, though it requires more manual interpretation:
kubectl exec --context=my-host-cluster -n vcluster-my-vcluster my-vcluster-0 -it -- cat /var/lib/vcluster/config.yaml
In vCluster versions before v0.26, the configuration file path is /var/vcluster/config.yaml
. Starting in v0.26, the file path has moved to /var/lib/vcluster/config.yaml
to align with common Kubernetes conventions.