Skip to main content
vCluster synchronizes Kubernetes resources between the virtual cluster and the host cluster. This page describes how to configure which resources are synchronized and in which direction.

Sync Overview

Resource synchronization works in two directions:
  • ToHost: Resources created in the virtual cluster that are synced to the host cluster
  • FromHost: Resources from the host cluster that are synced into the virtual cluster

ToHost Synchronization

sync.toHost
object
Configure resources to sync from the virtual cluster to the host cluster.

Core Resources

sync.toHost.pods
object
Pod synchronization configuration.
sync.toHost.secrets
object
Secret synchronization configuration.
sync.toHost.configMaps
object
ConfigMap synchronization configuration.
sync.toHost.services
object
Service synchronization configuration.
sync.toHost.endpoints
object
Endpoints synchronization configuration.
sync.toHost.endpointSlices
object
EndpointSlices synchronization configuration.

Storage Resources

sync.toHost.persistentVolumeClaims
object
PersistentVolumeClaim synchronization.
sync.toHost.persistentVolumes
object
PersistentVolume synchronization.
sync.toHost.storageClasses
object
StorageClass synchronization.
sync.toHost.volumeSnapshots
object
VolumeSnapshot synchronization.
sync.toHost.volumeSnapshotContents
object
VolumeSnapshotContent synchronization.

Network Resources

sync.toHost.ingresses
object
Ingress synchronization.
sync.toHost.networkPolicies
object
NetworkPolicy synchronization.

Other Resources

sync.toHost.serviceAccounts
object
ServiceAccount synchronization.
sync.toHost.podDisruptionBudgets
object
PodDisruptionBudget synchronization.
sync.toHost.priorityClasses
object
PriorityClass synchronization.
sync.toHost.namespaces
object
Namespace synchronization (PRO feature).

FromHost Synchronization

sync.fromHost
object
Configure resources to sync from the host cluster to the virtual cluster.

Events and Configs

sync.fromHost.events
object
Event synchronization from host to virtual cluster.
sync.fromHost.configMaps
object
ConfigMap synchronization from host.
sync.fromHost.secrets
object
Secret synchronization from host.

Storage and CSI

sync.fromHost.storageClasses
object
StorageClass synchronization from host.
sync.fromHost.csiDrivers
object
CSIDriver synchronization from host.
sync.fromHost.csiNodes
object
CSINode synchronization from host.
sync.fromHost.csiStorageCapacities
object
CSIStorageCapacity synchronization from host.

Nodes

sync.fromHost.nodes
object
Node synchronization from host.

Other Resources

sync.fromHost.ingressClasses
object
IngressClass synchronization from host.
sync.fromHost.runtimeClasses
object
RuntimeClass synchronization from host.
sync.fromHost.priorityClasses
object
PriorityClass synchronization from host.

Example: Basic Pod Syncing

sync:
  toHost:
    pods:
      enabled: true
      translateImage:
        "nginx:latest": "my-registry.com/nginx:1.21"
      enforceTolerations:
        - key: "workload"
          operator: "Equal"
          value: "vcluster"
          effect: "NoSchedule"

Example: Sync All Secrets and ConfigMaps

sync:
  toHost:
    secrets:
      enabled: true
      all: true
    configMaps:
      enabled: true
      all: true

Example: Host ConfigMap Mapping

sync:
  fromHost:
    configMaps:
      enabled: true
      mappings:
        byName:
          # Sync specific ConfigMap
          "kube-system/coredns": "kube-system/coredns"
          # Sync all ConfigMaps from namespace
          "monitoring/*": "monitoring/*"
          # Sync from vCluster host namespace to virtual namespace
          "/shared-config": "default/shared-config"

Example: Real Node Syncing

sync:
  fromHost:
    nodes:
      enabled: true
      syncBackChanges: false
      clearImageStatus: true
      selector:
        all: false
        labels:
          vcluster-node: "true"

Example: Storage Syncing

sync:
  toHost:
    persistentVolumeClaims:
      enabled: true
    volumeSnapshots:
      enabled: true
    volumeSnapshotContents:
      enabled: true
  fromHost:
    storageClasses:
      enabled: true

Build docs developers (and LLMs) love