Sync
A virtual cluster does not have actual worker nodes or a network. Instead, the vCluster syncer component replicates the pods that are created within the virtual cluster to the host cluster. Subsequently, the host cluster schedules the pods, and the syncer keeps the virtual cluster pods and host cluster pods in sync.
By default, vCluster runs with a minimal set of RBAC permissions to allow execution in restricted environments. Certain resources require extra permissions to sync, which will automatically be given to the vCluster ServiceAccount if you enable the resource sync with the associated config value.
Sync from Virtual Cluser to Host Cluster​
Enabled by Default​
Disabled by Default​
- Ingresses
- NetworkPolicies
- PersistentVolumes
- VolumeSnapshots
- StorageClasses
- ServiceAccounts
- PodDisruptionBudgets
- PriorityClasses
Config reference​
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​translate
required object[] pro​
Translate the patch according to the given patches.
translate
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 object pro​
Expression transforms the value according to the given JavaScript expression.
expression
required object pro​reference
required object pro​
Reference rewrites the value value according to the name.
reference
required object pro​apiVersion
required string pro​
APIVersion is the apiVersion of the referenced object.
apiVersion
required string pro​kind
required string pro​
Kind is the kind of the referenced object.
kind
required string pro​namePath
required string pro​
NamePath is the optional path to the reference name within the object. If omitted namePath equals to the
translate patch path.
namePath
required string pro​namespacePath
required string pro​
NamespacePath is the optional path to the reference namespace within the object. If omitted namespacePath equals to the
metadata.namespace path of the object.
namespacePath
required string 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​translate
required object[] pro​
Translate the patch according to the given patches.
translate
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 object pro​
Expression transforms the value according to the given JavaScript expression.
expression
required object pro​reference
required object pro​
Reference rewrites the value value according to the name.
reference
required object pro​apiVersion
required string pro​
APIVersion is the apiVersion of the referenced object.
apiVersion
required string pro​kind
required string pro​
Kind is the kind of the referenced object.
kind
required string pro​namePath
required string pro​
NamePath is the optional path to the reference name within the object. If omitted namePath equals to the
translate patch path.
namePath
required string pro​namespacePath
required string pro​
NamespacePath is the optional path to the reference namespace within the object. If omitted namespacePath equals to the
metadata.namespace path of the object.
namespacePath
required string 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​translate
required object[] pro​
Translate the patch according to the given patches.
translate
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 object pro​
Expression transforms the value according to the given JavaScript expression.
expression
required object pro​reference
required object pro​
Reference rewrites the value value according to the name.
reference
required object pro​apiVersion
required string pro​
APIVersion is the apiVersion of the referenced object.
apiVersion
required string pro​kind
required string pro​
Kind is the kind of the referenced object.
kind
required string pro​namePath
required string pro​
NamePath is the optional path to the reference name within the object. If omitted namePath equals to the
translate patch path.
namePath
required string pro​namespacePath
required string pro​
NamespacePath is the optional path to the reference namespace within the object. If omitted namespacePath equals to the
metadata.namespace path of the object.
namespacePath
required string 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​translate
required object[] pro​
Translate the patch according to the given patches.
translate
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 object pro​
Expression transforms the value according to the given JavaScript expression.
expression
required object pro​reference
required object pro​
Reference rewrites the value value according to the name.
reference
required object pro​apiVersion
required string pro​
APIVersion is the apiVersion of the referenced object.
apiVersion
required string pro​kind
required string pro​
Kind is the kind of the referenced object.
kind
required string pro​namePath
required string pro​
NamePath is the optional path to the reference name within the object. If omitted namePath equals to the
translate patch path.
namePath
required string pro​namespacePath
required string pro​
NamespacePath is the optional path to the reference namespace within the object. If omitted namespacePath equals to the
metadata.namespace path of the object.
namespacePath
required string 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​translate
required object[] pro​
Translate the patch according to the given patches.
translate
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 object pro​
Expression transforms the value according to the given JavaScript expression.
expression
required object pro​reference
required object pro​
Reference rewrites the value value according to the name.
reference
required object pro​apiVersion
required string pro​
APIVersion is the apiVersion of the referenced object.
apiVersion
required string pro​kind
required string pro​
Kind is the kind of the referenced object.
kind
required string pro​namePath
required string pro​
NamePath is the optional path to the reference name within the object. If omitted namePath equals to the
translate patch path.
namePath
required string pro​namespacePath
required string pro​
NamespacePath is the optional path to the reference namespace within the object. If omitted namespacePath equals to the
metadata.namespace path of the object.
namespacePath
required string 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​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​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​enabled
required boolean true pro​
Enabled defines if this option should be enabled.
enabled
required boolean true pro​translate
required object[] pro​
Translate the patch according to the given patches.
translate
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 object pro​
Expression transforms the value according to the given JavaScript expression.
expression
required object pro​reference
required object pro​
Reference rewrites the value value according to the name.
reference
required object pro​apiVersion
required string pro​
APIVersion is the apiVersion of the referenced object.
apiVersion
required string pro​kind
required string pro​
Kind is the kind of the referenced object.
kind
required string pro​namePath
required string pro​
NamePath is the optional path to the reference name within the object. If omitted namePath equals to the
translate patch path.
namePath
required string pro​namespacePath
required string pro​
NamespacePath is the optional path to the reference namespace within the object. If omitted namespacePath equals to the
metadata.namespace path of the object.
namespacePath
required string pro​persistentVolumes
required object pro​
PersistentVolumes defines if persistent volumes created within the virtual cluster should get synced to the host cluster.
persistentVolumes
required object pro​enabled
required boolean false pro​
Enabled defines if this option should be enabled.
enabled
required boolean false pro​volumeSnapshots
required object pro​
VolumeSnapshots defines if volume snapshots created within the virtual cluster should get synced to the host cluster.
volumeSnapshots
required object pro​enabled
required boolean false pro​
Enabled defines if this option should be enabled.
enabled
required boolean false pro​storageClasses
required object pro​
StorageClasses defines if storage classes created within the virtual cluster should get synced to the host cluster.
storageClasses
required object pro​enabled
required boolean false pro​
Enabled defines if this option should be enabled.
enabled
required boolean false pro​serviceAccounts
required object pro​
ServiceAccounts defines if service accounts created within the virtual cluster should get synced to the host cluster.
serviceAccounts
required object pro​enabled
required boolean false pro​
Enabled defines if this option should be enabled.
enabled
required boolean false pro​podDisruptionBudgets
required object pro​
PodDisruptionBudgets defines if pod disruption budgets created within the virtual cluster should get synced to the host cluster.
podDisruptionBudgets
required object pro​enabled
required boolean false pro​
Enabled defines if this option should be enabled.
enabled
required boolean false pro​priorityClasses
required object pro​
PriorityClasses defines if priority classes created within the virtual cluster should get synced to the host cluster.
priorityClasses
required object pro​enabled
required boolean false pro​
Enabled defines if this option should be enabled.
enabled
required boolean false pro​customResourceDefinitions
required object pro​
CustomResourceDefinitions defines what custom resource definitions should get synced from the virtual cluster to the host cluster.
customResourceDefinitions
required object pro​fromHost
required object pro​
Configure what resources vCluster should sync from the host cluster to the virtual cluster.
fromHost
required object pro​nodes
required object pro​
Nodes defines if nodes should get synced from the host cluster to the virtual cluster, but not back.
nodes
required object pro​enabled
required boolean false pro​
Enabled specifies if syncing real nodes should be enabled. If this is disabled, vCluster will create fake nodes instead.
enabled
required boolean false pro​syncBackChanges
required boolean false pro​
SyncBackChanges enables syncing labels and taints from the virtual cluster to the host cluster. If this is enabled someone within the virtual cluster will be able to change the labels and taints of the host cluster node.
syncBackChanges
required boolean false pro​clearImageStatus
required boolean false pro​
ClearImageStatus will erase the image status when syncing a node. This allows to hide images that are pulled by the node.
clearImageStatus
required boolean false pro​selector
required object pro​
Selector can be used to define more granular what nodes should get synced from the host cluster to the virtual cluster.
selector
required object pro​all
required boolean false pro​
All specifies if all nodes should get synced by vCluster from the host to the virtual cluster or only the ones where pods are assigned to.
all
required boolean false pro​labels
required object {} pro​
Labels are the node labels used to sync nodes from host cluster to virtual cluster. This will also set the node selector when syncing a pod from virtual cluster to host cluster to the same value.
labels
required object {} pro​events
required object pro​
Events defines if events should get synced from the host cluster to the virtual cluster, but not back.
events
required object pro​enabled
required boolean true pro​
Enabled defines if this option should be enabled.
enabled
required boolean true pro​ingressClasses
required object pro​
IngressClasses defines if ingress classes should get synced from the host cluster to the virtual cluster, but not back.
ingressClasses
required object pro​enabled
required boolean false pro​
Enabled defines if this option should be enabled.
enabled
required boolean false pro​runtimeClasses
required object pro​
RuntimeClasses defines if runtime classes should get synced from the host cluster to the virtual cluster, but not back.
runtimeClasses
required object pro​enabled
required boolean false pro​
Enabled defines if this option should be enabled.
enabled
required boolean false pro​priorityClasses
required object pro​
PriorityClasses defines if priority classes classes should get synced from the host cluster to the virtual cluster, but not back.
priorityClasses
required object pro​enabled
required boolean false pro​
Enabled defines if this option should be enabled.
enabled
required boolean false pro​storageClasses
required object pro​
StorageClasses defines if storage classes should get synced from the host cluster to the virtual cluster, but not back. If auto, is automatically enabled when the virtual scheduler is enabled.
storageClasses
required object pro​enabled
required string|boolean auto pro​
Enabled defines if this option should be enabled.
enabled
required string|boolean auto pro​csiNodes
required object pro​
CSINodes defines if csi nodes should get synced from the host cluster to the virtual cluster, but not back. If auto, is automatically enabled when the virtual scheduler is enabled.
csiNodes
required object pro​enabled
required string|boolean auto pro​
Enabled defines if this option should be enabled.
enabled
required string|boolean auto pro​csiDrivers
required object pro​
CSIDrivers defines if csi drivers should get synced from the host cluster to the virtual cluster, but not back. If auto, is automatically enabled when the virtual scheduler is enabled.
csiDrivers
required object pro​enabled
required string|boolean auto pro​
Enabled defines if this option should be enabled.
enabled
required string|boolean auto pro​csiStorageCapacities
required object pro​
CSIStorageCapacities defines if csi storage capacities should get synced from the host cluster to the virtual cluster, but not back. If auto, is automatically enabled when the virtual scheduler is enabled.
csiStorageCapacities
required object pro​enabled
required string|boolean auto pro​
Enabled defines if this option should be enabled.
enabled
required string|boolean auto pro​customResourceDefinitions
required object pro​
CustomResourceDefinitions defines what custom resource definitions should get synced read-only to the virtual cluster from the host cluster.
customResourceDefinitions
required object pro​