Skip to main content

Synced Resources

This section lists all resources that can be synced or mirrored by vcluster currently in the table below. Those resources can be activated or deactivated via the values.yaml as described below, or with the --sync flag of the syncer. By default, certain resources are already activated and you can either disable the default resources or tell vcluster to sync other supported resources as well.

ResourceDescriptionDefault Enabled
servicesMirrors services between host and virtual clusterYes
endpointsMirrors endpoints between host and virtual clusterYes
configmapsMirrors used configmaps by pods between host and virtual clusterYes
secretsMirrors used secrets by ingresses or pods between host and virtual clusterYes
eventsSyncs events from host cluster to virtual clusterYes
podsMirrors pods between host and virtual clusterYes
persistentvolumeclaimsMirrors persistent volume claims between host and virtual clusterYes
ingressesMirrors ingresses between host and virtual cluster. Automatically tries to detect the supported ingress version (networking.k8s.io/v1 or networking.k8s.io/v1beta1)Yes
fake-nodesCreates fake nodes based on spec.nodeName fields of synced pods. Requires no cluster roleYes
fake-persistentvolumesCreates fake persistent volumes based on spec.volumeName of persistent volume claims. Requires no cluster roleYes
nodesSyncs real nodes from host cluster to virtual cluster. If enabled, implies that fake-nodes is disabled. For more information see nodes.No
persistentvolumesMirrors persistent volumes from vcluster to host cluster and dynamically created persistent volumes from host cluster to virtual cluster. If enabled, implies that fake-persistentvolumes is disabled. For more information see storage.No
storageclassesSyncs created storage classes from virtual cluster to host clusterNo
legacy-storageclassesSyncs real storage classes from host cluster to virtual clusterNo
priorityclassesSyncs created priority classes from virtual cluster to host clusterNo
networkpoliciesSyncs created network policies from virtual cluster to host clusterNo
volumesnapshotsEnables volumesnapshot, volumesnapshotcontents and volumesnapshotclasses support. Syncing behaves similar to persistentvolumeclaims, persistentvolumes and storage classes. For more information see storage.No
poddisruptionbudgetsSyncs created poddisruptionbudgets from virtual cluster to host clusterNo
serviceaccountsSyncs created service accounts from virtual cluster to host cluster. This is useful for using IAM roles for service accounts with vclusterNo

By default, vcluster runs with a minimal set of RBAC permissions to allow execution in restricted environments. Certain resources require extra permissions, which will be automatically given to the vcluster ServiceAccount if you enable the resource sync with the associated helm value.

Enable or disable synced resources#

To enable a resource syncronization, for example persistent volumes, and automatically create the necessary RBAC permissions, add the following to your values.yaml:

sync:
persistentvolumes:
enabled: true

then create or upgrade the vcluster with:

vcluster create my-vcluster -n my-vcluster-namespace --upgrade -f values.yaml

To disable a resource that is synced by default, for example if you don't want to sync ingresses, set the following in your values.yaml:

sync:
ingresses:
enabled: false

then create or upgrade the vcluster with:

vcluster create my-vcluster -n my-vcluster-namespace --upgrade -f values.yaml
Correct Cluster Functionality

Disabling certain resources such as services, endpoints or pods can lead to a non-functional virtual Kubernetes cluster, so be careful with what resources you are deactivating.

Sync other resources#

Syncing other resources such as deployments, statefulsets and namespaces is usually not needed as those just control lower level resources and since those lower level resources are synced the cluster can function correctly.

However, there might be cases though were custom syncing of resources might be needed or beneficial. In order to accomplish this, vcluster provides an SDK to develop your own resource syncers as plugins. To find out more, please take a look at the plugins documenation.