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.
Resource | Description | Default Enabled |
---|---|---|
services | Mirrors services between host and virtual cluster | Yes |
endpoints | Mirrors endpoints between host and virtual cluster | Yes |
configmaps | Mirrors used configmaps by pods between host and virtual cluster | Yes |
secrets | Mirrors used secrets by ingresses or pods between host and virtual cluster | Yes |
events | Syncs events from host cluster to virtual cluster | Yes |
pods | Mirrors pods between host and virtual cluster | Yes |
persistentvolumeclaims | Mirrors persistent volume claims between host and virtual cluster | Yes |
ingresses | Mirrors 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-nodes | Creates fake nodes based on spec.nodeName fields of synced pods. Requires no cluster role | Yes |
fake-persistentvolumes | Creates fake persistent volumes based on spec.volumeName of persistent volume claims. Requires no cluster role | Yes |
nodes | Syncs real nodes from host cluster to virtual cluster. If enabled, implies that fake-nodes is disabled. For more information see nodes. | No |
persistentvolumes | Mirrors 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 |
storageclasses | Syncs created storage classes from virtual cluster to host cluster | No |
legacy-storageclasses | Syncs real storage classes from host cluster to virtual cluster | No |
priorityclasses | Syncs created priority classes from virtual cluster to host cluster | No |
networkpolicies | Syncs created network policies from virtual cluster to host cluster | No |
volumesnapshots | Enables volumesnapshot, volumesnapshotcontents and volumesnapshotclasses support. Syncing behaves similar to persistentvolumeclaims, persistentvolumes and storage classes. For more information see storage. | No |
poddisruptionbudgets | Syncs created poddisruptionbudgets from virtual cluster to host cluster | No |
serviceaccounts | Syncs created service accounts from virtual cluster to host cluster. This is useful for using IAM roles for service accounts with vcluster | No |
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 resourcesTo enable a resource syncronization, for example persistent volumes, and automatically create the necessary RBAC permissions, add the following to your values.yaml
:
then create or upgrade the vcluster with:
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
:
then create or upgrade the vcluster with:
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 resourcesSyncing 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.