vcluster.yaml configuration reference
Create a virtual cluster with a config file​
Pre-v0.20.0 values.yaml
files are not equivalent to vcluster.yaml
with v0.20.0. If you are moving from vCluster 0.19.x to 0.20+, see the conversion guide for how to automatically convert your existing values.yaml
configuration file to the new vcluster.yaml
format.
Configure your vCluster installation in an optional vcluster.yaml
configuration file. Then deploy your changes.
- vCluster CLI
- Helm
- Terraform
- Argo CD
- Cluster API
To keep the same version of your vCluster, your CLI needs to be the same version as your virtual cluster.
vcluster create --upgrade <VCLUSTER_NAME> -n <VCLUSTER_NAMESPACE> -f vcluster.yaml
Replace:
<VCLUSTER_NAME>
with the name of the vCluster instance to update.<VCLUSTER_NAMESPACE>
with the namespace where the vCluster instance is deployed.
helm upgrade --install <VCLUSTER_NAME> vcluster \
--values vcluster.yaml \
--repo https://charts.loft.sh \
--namespace <VCLUSTER_NAMESPACE> \
--repository-config=''
Replace:
<VCLUSTER_NAME>
with the name of the vCluster instance to update.<VCLUSTER_NAMESPACE>
with the namespace where the vCluster instance is deployed.
Generate a new plan with your updated
vcluster.yaml
.terraform plan
Verify that the provider can access your cluster and that the proposed changes are correct.
Apply your new changes.
terraform apply
The steps assume that you have the terraform file that you initially deployed your terraform resource from.
Commit and push your updated
vcluster.yaml
to your configured ArgoCD repository.Synchronize your ArgoCD repository with your configured cluster.
Learn more about Cluster API Provider for vCluster.
Install the vCluster provider.
clusterctl init --infrastructure vcluster:v0.2.0
Export environment variables to be used by the cluster API provider to create an updated manifest. The manifest will be applied to your Kubernetes cluster, which will update your vCluster with the updated configuration options.
# Replace <VCLUSTER_NAME> and <VCLUSTER_NAMESPACE> with values of the vCluster that you are updating
export CLUSTER_NAME=<VCLUSTER_NAME>
export CLUSTER_NAMESPACE=<VCLUSTER_NAMESPACE>
# Since the vcluster.yaml has changed, you'll need to re-export it to the updated vcluster.yaml
export VCLUSTER_YAML=$(awk '{printf "%s\\n", $0}' vcluster.yaml)Replace:
<VCLUSTER_NAME>
with the name of the vCluster instance to update.<VCLUSTER_NAMESPACE>
with the namespace where the vCluster instance is deployed.
Regenerate the manifest and apply the updated manifest.
clusterctl generate cluster ${CLUSTER_NAME} \
--infrastructure vcluster \
--target-namespace ${CLUSTER_NAMESPACE} \
| kubectl apply -f -Kubernetes VersionThe Kubernetes version for the vCluster is not set at the CAPI provider command. It is configured the
vcluster.yaml
file based on your Kubernetes distribution.Wait for vCluster to be updated by watching for the vCluster custom resource to report a
ready
status.kubectl wait --for=condition=ready vcluster -n $CLUSTER_NAMESPACE $CLUSTER_NAME --timeout=300s
What is the vcluster.yaml file?​
The vcluster.yaml
file holds your vCluster configuration and can override the vCluster defaults. If you are familiar with helm, the vcluster.yaml
can be used interchangeably with values.yaml
and since all vCluster deployment methods are using helm under the hood it behaves the same way. The default values for vCluster you can find in the vCluster repo chart folder. We also publish a vcluster.yaml
json schema within the vCluster helm chart that will be used for validating the vcluster.yaml
.
Config reference​
exportKubeConfig
required object pro​
ExportKubeConfig describes how vCluster should export the vCluster kubeConfig file.
exportKubeConfig
required object pro​context
required string pro​
Context is the name of the context within the generated kubeconfig to use.
context
required string pro​server
required string pro​
Override the default https://localhost:8443 and specify a custom hostname for the generated kubeconfig.
server
required string pro​insecure
required boolean false pro​
If tls should get skipped for the server
insecure
required boolean false pro​serviceAccount
required object pro​
ServiceAccount can be used to generate a service account token instead of the default certificates.
serviceAccount
required object pro​name
required string pro​
Name of the service account to be used to generate a service account token instead of the default certificates.
name
required string pro​namespace
required string pro​
Namespace of the service account to be used to generate a service account token instead of the default certificates.
If omitted, will use the kube-system namespace.
namespace
required string pro​clusterRole
required string pro​
ClusterRole to assign to the service account.
clusterRole
required string pro​secret
required object pro​
Declare in which host cluster secret vCluster should store the generated virtual cluster kubeconfig.
If this is not defined, vCluster will create it with vc-NAME
. If you specify another name,
vCluster creates the config in this other secret.
secret
required object pro​vc-NAME
. If you specify another name,
vCluster creates the config in this other secret.name
required string pro​
Name is the name of the secret where the kubeconfig should get stored.
name
required string pro​namespace
required string pro​
Namespace where vCluster should store the kubeconfig secret. If this is not equal to the namespace
where you deployed vCluster, you need to make sure vCluster has access to this other namespace.
namespace
required string pro​integrations
required object pro​
Integrations holds config for vCluster integrations with other operators or tools running on the host cluster
integrations
required object pro​metricsServer
required object pro​
MetricsServer reuses the metrics server from the host cluster within the vCluster.
metricsServer
required object pro​enabled
required boolean false pro​
Enabled signals the metrics server integration should be enabled.
enabled
required boolean false pro​apiService
required object pro​
APIService holds information about where to find the metrics-server service. Defaults to metrics-server/kube-system.
apiService
required object pro​service
required object pro​
Service is a reference to the service for the API server.
service
required object pro​nodes
required boolean true pro​
Nodes defines if metrics-server nodes api should get proxied from host to virtual cluster.
nodes
required boolean true pro​pods
required boolean true pro​
Pods defines if metrics-server pods api should get proxied from host to virtual cluster.
pods
required boolean true pro​kubeVirt
required object pro​
KubeVirt reuses a host kubevirt and makes certain CRDs from it available inside the vCluster
kubeVirt
required object pro​enabled
required boolean false pro​
Enabled signals if the integration should be enabled
enabled
required boolean false pro​apiService
required object pro​
APIService holds information about where to find the virt-api service. Defaults to virt-api/kubevirt.
apiService
required object pro​service
required object pro​
Service is a reference to the service for the API server.
service
required object pro​webhook
required object pro​
Webhook holds configuration for enabling the webhook within the vCluster
webhook
required object pro​enabled
required boolean true pro​
Enabled defines if this option should be enabled.
enabled
required boolean true pro​sync
required object pro​
Sync holds configuration on what resources to sync
sync
required object pro​dataVolumes
required object pro​
If DataVolumes should get synced
dataVolumes
required object pro​enabled
required boolean false pro​
Enabled defines if this option should be enabled.
enabled
required boolean false pro​virtualMachineInstanceMigrations
required object pro​
If VirtualMachineInstanceMigrations should get synced
virtualMachineInstanceMigrations
required object pro​enabled
required boolean true pro​
Enabled defines if this option should be enabled.
enabled
required boolean true pro​virtualMachineInstances
required object pro​
If VirtualMachineInstances should get synced
virtualMachineInstances
required object pro​enabled
required boolean true pro​
Enabled defines if this option should be enabled.
enabled
required boolean true pro​virtualMachines
required object pro​
If VirtualMachines should get synced
virtualMachines
required object pro​enabled
required boolean true pro​
Enabled defines if this option should be enabled.
enabled
required boolean true pro​externalSecrets
required object pro​
ExternalSecrets reuses a host external secret operator and makes certain CRDs from it available inside the vCluster
externalSecrets
required object pro​enabled
required boolean false pro​
Enabled defines whether the external secret integration is enabled or not
enabled
required boolean false pro​webhook
required object pro​
Webhook defines whether the host webhooks are reused or not
webhook
required object pro​enabled
required boolean false pro​
Enabled defines if this option should be enabled.
enabled
required boolean false pro​sync
required object pro​
Sync defines the syncing behavior for the integration
sync
required object pro​externalSecrets
required object pro​
ExternalSecrets defines whether to sync external secrets or not
externalSecrets
required object pro​enabled
required boolean true pro​
Enabled defines if this option should be enabled.
enabled
required boolean true pro​stores
required object pro​
Stores defines whether to sync stores or not
stores
required object pro​enabled
required boolean false pro​
Enabled defines if this option should be enabled.
enabled
required boolean false pro​clusterStores
required object pro​
ClusterStores defines whether to sync cluster stores or not
clusterStores
required object pro​certManager
required object pro​
CertManager reuses a host cert-manager and makes its CRDs from it available inside the vCluster.
- Certificates and Issuers will be synced from the virtual cluster to the host cluster.
- ClusterIssuers will be synced from the host cluster to the virtual cluster.
certManager
required object pro​enabled
required boolean false pro​
Enabled defines if this option should be enabled.
enabled
required boolean false pro​sync
required object pro​
Sync contains advanced configuration for syncing cert-manager resources.
sync
required object pro​toHost
required object pro​
toHost
required object pro​sync
required object pro​
Sync describes how to sync resources from the virtual cluster to host cluster and back.
sync
required object pro​toHost
required object pro​
Configure resources to sync from the virtual cluster to the host cluster.
toHost
required object pro​pods
required object pro​
Pods defines if pods created within the virtual cluster should get synced to the host cluster.
pods
required object pro​enabled
required boolean true pro​
Enabled defines if pod syncing should be enabled.
enabled
required boolean true pro​translateImage
required object {} pro​
TranslateImage maps an image to another image that should be used instead. For example this can be used to rewrite
a certain image that is used within the virtual cluster to be another image on the host cluster
translateImage
required object {} pro​enforceTolerations
required string[] [] pro​
EnforceTolerations will add the specified tolerations to all pods synced by the virtual cluster.
enforceTolerations
required string[] [] pro​useSecretsForSATokens
required boolean false pro​
UseSecretsForSATokens will use secrets to save the generated service account tokens by virtual cluster instead of using a
pod annotation.
useSecretsForSATokens
required boolean false pro​rewriteHosts
required object pro​
RewriteHosts is a special option needed to rewrite statefulset containers to allow the correct FQDN. virtual cluster will add
a small container to each stateful set pod that will initially rewrite the /etc/hosts file to match the FQDN expected by
the virtual cluster.
rewriteHosts
required object pro​enabled
required boolean true pro​
Enabled specifies if rewriting stateful set pods should be enabled.
enabled
required boolean true pro​initContainer
required object pro​
InitContainer holds extra options for the init container used by vCluster to rewrite the FQDN for stateful set pods.
initContainer
required object pro​patches
required object[] pro​
Patches patch the resource according to the provided specification.
patches
required object[] pro​path
required string pro​
Path is the path within the patch to target. If the path is not found within the patch, the patch is not applied.
path
required string pro​expression
required string pro​
Expression transforms the value according to the given JavaScript expression.
expression
required string pro​reverseExpression
required string pro​
ReverseExpression transforms the value according to the given JavaScript expression.
reverseExpression
required string pro​reference
required object pro​
Reference treats the path value as a reference to another object and will rewrite it based on the chosen mode
automatically. In single-namespace mode this will translate the name to "vxxxxxxxxx" to avoid conflicts with
other names, in multi-namespace mode this will not translate the name.
reference
required object pro​apiVersion
required string pro​
APIVersion is the apiVersion of the referenced object.
apiVersion
required string pro​apiVersionPath
required string pro​
APIVersionPath is optional relative path to use to determine the kind. If APIVersionPath is not found, will fallback to apiVersion.
apiVersionPath
required string pro​kind
required string pro​
Kind is the kind of the referenced object.
kind
required string pro​kindPath
required string pro​
KindPath is the optional relative path to use to determine the kind. If KindPath is not found, will fallback to kind.
kindPath
required string pro​namePath
required string pro​
NamePath is the optional relative path to the reference name within the object.
namePath
required string pro​namespacePath
required string pro​
NamespacePath is the optional relative path to the reference namespace within the object. If omitted or not found, namespacePath equals to the
metadata.namespace path of the object.
namespacePath
required string pro​labels
required object pro​
Labels treats the path value as a labels selector.
labels
required object pro​secrets
required object pro​
Secrets defines if secrets created within the virtual cluster should get synced to the host cluster.
secrets
required object pro​enabled
required boolean true pro​
Enabled defines if this option should be enabled.
enabled
required boolean true pro​all
required boolean false pro​
All defines if all resources of that type should get synced or only the necessary ones that are needed.
all
required boolean false pro​patches
required object[] pro​
Patches patch the resource according to the provided specification.
patches
required object[] pro​path
required string pro​
Path is the path within the patch to target. If the path is not found within the patch, the patch is not applied.
path
required string pro​expression
required string pro​
Expression transforms the value according to the given JavaScript expression.
expression
required string pro​reverseExpression
required string pro​
ReverseExpression transforms the value according to the given JavaScript expression.
reverseExpression
required string pro​reference
required object pro​
Reference treats the path value as a reference to another object and will rewrite it based on the chosen mode
automatically. In single-namespace mode this will translate the name to "vxxxxxxxxx" to avoid conflicts with
other names, in multi-namespace mode this will not translate the name.
reference
required object pro​apiVersion
required string pro​
APIVersion is the apiVersion of the referenced object.
apiVersion
required string pro​apiVersionPath
required string pro​
APIVersionPath is optional relative path to use to determine the kind. If APIVersionPath is not found, will fallback to apiVersion.
apiVersionPath
required string pro​kind
required string pro​
Kind is the kind of the referenced object.
kind
required string pro​kindPath
required string pro​
KindPath is the optional relative path to use to determine the kind. If KindPath is not found, will fallback to kind.
kindPath
required string pro​namePath
required string pro​
NamePath is the optional relative path to the reference name within the object.
namePath
required string pro​namespacePath
required string pro​
NamespacePath is the optional relative path to the reference namespace within the object. If omitted or not found, namespacePath equals to the
metadata.namespace path of the object.
namespacePath
required string pro​labels
required object pro​
Labels treats the path value as a labels selector.
labels
required object pro​configMaps
required object pro​
ConfigMaps defines if config maps created within the virtual cluster should get synced to the host cluster.
configMaps
required object pro​enabled
required boolean true pro​
Enabled defines if this option should be enabled.
enabled
required boolean true pro​all
required boolean false pro​
All defines if all resources of that type should get synced or only the necessary ones that are needed.
all
required boolean false pro​patches
required object[] pro​
Patches patch the resource according to the provided specification.
patches
required object[] pro​path
required string pro​
Path is the path within the patch to target. If the path is not found within the patch, the patch is not applied.
path
required string pro​expression
required string pro​
Expression transforms the value according to the given JavaScript expression.
expression
required string pro​reverseExpression
required string pro​
ReverseExpression transforms the value according to the given JavaScript expression.
reverseExpression
required string pro​reference
required object pro​
Reference treats the path value as a reference to another object and will rewrite it based on the chosen mode
automatically. In single-namespace mode this will translate the name to "vxxxxxxxxx" to avoid conflicts with
other names, in multi-namespace mode this will not translate the name.
reference
required object pro​apiVersion
required string pro​
APIVersion is the apiVersion of the referenced object.
apiVersion
required string pro​apiVersionPath
required string pro​
APIVersionPath is optional relative path to use to determine the kind. If APIVersionPath is not found, will fallback to apiVersion.
apiVersionPath
required string pro​kind
required string pro​
Kind is the kind of the referenced object.
kind
required string pro​kindPath
required string pro​
KindPath is the optional relative path to use to determine the kind. If KindPath is not found, will fallback to kind.
kindPath
required string pro​namePath
required string pro​
NamePath is the optional relative path to the reference name within the object.
namePath
required string pro​namespacePath
required string pro​
NamespacePath is the optional relative path to the reference namespace within the object. If omitted or not found, namespacePath equals to the
metadata.namespace path of the object.
namespacePath
required string pro​labels
required object pro​
Labels treats the path value as a labels selector.
labels
required object pro​ingresses
required object pro​
Ingresses defines if ingresses created within the virtual cluster should get synced to the host cluster.
ingresses
required object pro​enabled
required boolean false pro​
Enabled defines if this option should be enabled.
enabled
required boolean false pro​patches
required object[] pro​
Patches patch the resource according to the provided specification.
patches
required object[] pro​path
required string pro​
Path is the path within the patch to target. If the path is not found within the patch, the patch is not applied.
path
required string pro​expression
required string pro​
Expression transforms the value according to the given JavaScript expression.
expression
required string pro​reverseExpression
required string pro​
ReverseExpression transforms the value according to the given JavaScript expression.
reverseExpression
required string pro​reference
required object pro​
Reference treats the path value as a reference to another object and will rewrite it based on the chosen mode
automatically. In single-namespace mode this will translate the name to "vxxxxxxxxx" to avoid conflicts with
other names, in multi-namespace mode this will not translate the name.
reference
required object pro​apiVersion
required string pro​
APIVersion is the apiVersion of the referenced object.
apiVersion
required string pro​apiVersionPath
required string pro​
APIVersionPath is optional relative path to use to determine the kind. If APIVersionPath is not found, will fallback to apiVersion.
apiVersionPath
required string pro​kind
required string pro​
Kind is the kind of the referenced object.
kind
required string pro​kindPath
required string pro​
KindPath is the optional relative path to use to determine the kind. If KindPath is not found, will fallback to kind.
kindPath
required string pro​namePath
required string pro​
NamePath is the optional relative path to the reference name within the object.
namePath
required string pro​namespacePath
required string pro​
NamespacePath is the optional relative path to the reference namespace within the object. If omitted or not found, namespacePath equals to the
metadata.namespace path of the object.
namespacePath
required string pro​labels
required object pro​
Labels treats the path value as a labels selector.
labels
required object pro​services
required object pro​
Services defines if services created within the virtual cluster should get synced to the host cluster.
services
required object pro​enabled
required boolean true pro​
Enabled defines if this option should be enabled.
enabled
required boolean true pro​patches
required object[] pro​
Patches patch the resource according to the provided specification.
patches
required object[] pro​path
required string pro​
Path is the path within the patch to target. If the path is not found within the patch, the patch is not applied.
path
required string pro​expression
required string pro​
Expression transforms the value according to the given JavaScript expression.
expression
required string pro​reverseExpression
required string pro​
ReverseExpression transforms the value according to the given JavaScript expression.
reverseExpression
required string pro​reference
required object pro​
Reference treats the path value as a reference to another object and will rewrite it based on the chosen mode
automatically. In single-namespace mode this will translate the name to "vxxxxxxxxx" to avoid conflicts with
other names, in multi-namespace mode this will not translate the name.
reference
required object pro​apiVersion
required string pro​
APIVersion is the apiVersion of the referenced object.
apiVersion
required string pro​apiVersionPath
required string pro​
APIVersionPath is optional relative path to use to determine the kind. If APIVersionPath is not found, will fallback to apiVersion.
apiVersionPath
required string pro​kind
required string pro​
Kind is the kind of the referenced object.
kind
required string pro​kindPath
required string pro​
KindPath is the optional relative path to use to determine the kind. If KindPath is not found, will fallback to kind.
kindPath
required string pro​namePath
required string pro​
NamePath is the optional relative path to the reference name within the object.
namePath
required string pro​namespacePath
required string pro​
NamespacePath is the optional relative path to the reference namespace within the object. If omitted or not found, namespacePath equals to the
metadata.namespace path of the object.
namespacePath
required string pro​labels
required object pro​
Labels treats the path value as a labels selector.
labels
required object pro​endpoints
required object pro​
Endpoints defines if endpoints created within the virtual cluster should get synced to the host cluster.
endpoints
required object pro​enabled
required boolean true pro​
Enabled defines if this option should be enabled.
enabled
required boolean true pro​patches
required object[] pro​
Patches patch the resource according to the provided specification.
patches
required object[] pro​path
required string pro​
Path is the path within the patch to target. If the path is not found within the patch, the patch is not applied.
path
required string pro​expression
required string pro​
Expression transforms the value according to the given JavaScript expression.
expression
required string pro​reverseExpression
required string pro​
ReverseExpression transforms the value according to the given JavaScript expression.
reverseExpression
required string pro​reference
required object pro​
Reference treats the path value as a reference to another object and will rewrite it based on the chosen mode
automatically. In single-namespace mode this will translate the name to "vxxxxxxxxx" to avoid conflicts with
other names, in multi-namespace mode this will not translate the name.
reference
required object pro​apiVersion
required string pro​
APIVersion is the apiVersion of the referenced object.
apiVersion
required string pro​apiVersionPath
required string pro​
APIVersionPath is optional relative path to use to determine the kind. If APIVersionPath is not found, will fallback to apiVersion.
apiVersionPath
required string pro​kind
required string pro​
Kind is the kind of the referenced object.
kind
required string pro​kindPath
required string pro​
KindPath is the optional relative path to use to determine the kind. If KindPath is not found, will fallback to kind.
kindPath
required string pro​namePath
required string pro​
NamePath is the optional relative path to the reference name within the object.
namePath
required string pro​namespacePath
required string pro​
NamespacePath is the optional relative path to the reference namespace within the object. If omitted or not found, namespacePath equals to the
metadata.namespace path of the object.
namespacePath
required string pro​labels
required object pro​
Labels treats the path value as a labels selector.
labels
required object pro​networkPolicies
required object pro​
NetworkPolicies defines if network policies created within the virtual cluster should get synced to the host cluster.
networkPolicies
required object pro​enabled
required boolean false pro​
Enabled defines if this option should be enabled.
enabled
required boolean false pro​patches
required object[] pro​
Patches patch the resource according to the provided specification.
patches
required object[] pro​path
required string pro​
Path is the path within the patch to target. If the path is not found within the patch, the patch is not applied.
path
required string pro​expression
required string pro​
Expression transforms the value according to the given JavaScript expression.
expression
required string pro​reverseExpression
required string pro​
ReverseExpression transforms the value according to the given JavaScript expression.
reverseExpression
required string pro​reference
required object pro​
Reference treats the path value as a reference to another object and will rewrite it based on the chosen mode
automatically. In single-namespace mode this will translate the name to "vxxxxxxxxx" to avoid conflicts with
other names, in multi-namespace mode this will not translate the name.
reference
required object pro​apiVersion
required string pro​
APIVersion is the apiVersion of the referenced object.
apiVersion
required string pro​apiVersionPath
required string pro​
APIVersionPath is optional relative path to use to determine the kind. If APIVersionPath is not found, will fallback to apiVersion.
apiVersionPath
required string pro​kind
required string pro​
Kind is the kind of the referenced object.
kind
required string pro​kindPath
required string pro​
KindPath is the optional relative path to use to determine the kind. If KindPath is not found, will fallback to kind.
kindPath
required string pro​namePath
required string pro​
NamePath is the optional relative path to the reference name within the object.
namePath
required string pro​namespacePath
required string pro​
NamespacePath is the optional relative path to the reference namespace within the object. If omitted or not found, namespacePath equals to the
metadata.namespace path of the object.
namespacePath
required string pro​labels
required object pro​
Labels treats the path value as a labels selector.
labels
required object pro​persistentVolumeClaims
required object pro​
PersistentVolumeClaims defines if persistent volume claims created within the virtual cluster should get synced to the host cluster.
persistentVolumeClaims
required object pro​