Skip to main content
Version: main 🚧
Supported Configurations
Running the control plane as a container with:

Virtual scheduler

By default, vCluster reuses the control plane cluster scheduler to schedule workloads. This conserves compute resources.

If you also sync PersistentVolumeClaim resources, vCluster mirrors the related CSIDriver, CSINode, and CSIStorageCapacity objects into the tenant cluster. This allows the virtual scheduler to make storage-aware scheduling decisions.

In some cases, you might want to label or taint nodes inside the tenant cluster to influence scheduling decisionsβ€”for example, using node affinity or topology spread constraints.

To support these use cases, vCluster allows you to run a scheduler inside the tenant cluster instead of reusing the control plane cluster’s scheduler.

Enable the virtual scheduler​

To use the virtual scheduler, you must enable the following:

  • Syncing nodes from the control plane cluster (sync.fromHost.nodes.enabled)
  • The virtual scheduler (controlPlane.advanced.virtualScheduler.enabled)

When the virtual scheduler is enabled:

  • vCluster only syncs pods that already have a node assigned in the control plane cluster.
  • You can label and taint nodes within the tenant cluster without affecting the control plane cluster.

Configure your vcluster.yaml to sync nodes from the control plane cluster and enable the virtual scheduler:

sync:
fromHost:
nodes:
enabled: true

controlPlane:
advanced:
virtualScheduler:
enabled: true

This setting makes control plane cluster nodes available inside the tenant cluster. It allows the virtual scheduler to make scheduling decisions based on node labels and taints.

Automatically enable sync features​

When the virtual scheduler is enabled, the following resources are automatically synced from the control plane cluster:

This automatic syncing only occurs if:

  • Syncing for CSI resources from the control plane cluster is set to auto (the default).
  • PersistentVolumeClaim syncing to the control plane cluster is enabled.
info

If you sync PersistentVolumeClaim resources, vCluster mirrors the related CSIDriver, CSINode, and CSIStorageCapacity objects into the tenant cluster. This allows the virtual scheduler to make storage-aware scheduling decisions.

Manually disabling these features might result in incorrect pod scheduling behavior.

Example​

If your vcluster.yaml is configured as:

controlPlane:
advanced:
virtualScheduler:
enabled: true

sync:
toHost:
persistentVolumeClaims:
enabled: true

fromHost:
# All 'auto' values below are set by default
csiDrivers:
enabled: auto
csiNodes:
enabled: auto
csiStorageCapacities:
enabled: auto

Then, vCluster automatically updates the config to:

controlPlane:
advanced:
virtualScheduler:
enabled: true

sync:
toHost:
persistentVolumeClaims:
enabled: true

# vCluster enables these values because the virtual scheduler is active
fromHost:
csiDrivers:
enabled: true
csiNodes:
enabled: true
csiStorageCapacities:
enabled: true

Config reference​

virtualScheduler required object ​

VirtualScheduler defines if a scheduler should be used within the virtual cluster or the scheduling decision for workloads will be made by the host cluster. Deprecated: Use ControlPlane.Distro.K8S.Scheduler instead.

enabled required boolean false ​

Enabled defines if this option should be enabled.

Additional resources​