Skip to main content
Version: v0.25 Stable

Virtual scheduler

By default, vCluster reuses the host 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 virtual 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 virtual 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 virtual cluster instead of reusing the host cluster’s scheduler.

Enable the virtual scheduler​

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

  • Syncing nodes from the host 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 host cluster.
  • You can label and taint nodes within the virtual cluster without affecting the host cluster.

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

sync:
fromHost:
nodes:
enabled: true

controlPlane:
advanced:
virtualScheduler:
enabled: true

This setting makes host cluster nodes available inside the virtual 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 host cluster:

This automatic syncing only occurs if:

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

If you sync PersistentVolumeClaim resources, vCluster mirrors the related CSIDriver, CSINode, and CSIStorageCapacity objects into the virtual 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 pro​

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.

enabled required boolean false pro​

Enabled defines if this option should be enabled.

Additional resources​