Skip to main content
Version: v0.38 Stable

Persistent volumes

Supported Configurations
Running the control plane as a container with:

By default, this is disabled.

Sync PersistentVolume resources from the cluster to the control plane cluster. When disabled, vCluster creates pseudo PersistentVolume resources instead. Enabling PersistentVolume syncing is not necessary to use PersistentVolumeClaim syncing. Dynamic provisioning through a StorageClass and PersistentVolumeClaim sync doesn't require this setting.

Enable this feature if you have a scenario that require details about the PersistentVolume and its IDs, you want to create PersistentVolume's directly in the cluster, such as when you want to use Velero or specific CSI drivers.

hostPath PersistentVolumes on shared nodes

On shared nodes, enabling this lets a tenant create a PersistentVolume with spec.hostPath set to any path on the node, then mount it through an ordinary PersistentVolumeClaim. Pod Security Standards don't catch this, since the Pod's volume is a PVC, not a hostPath volume. If you enable PersistentVolume sync on shared nodes, add control plane cluster admission that denies synced PersistentVolumes with spec.hostPath, or restricts them to an explicit safe-path allowlist. See storage breakout prevention.

Sync PersistentVolumes from the tenant to control plane cluster​

sync:
toHost:
persistentVolumes:
enabled: true

Patches​

Use sync.toHost.persistentVolumes.patches to transform PersistentVolume fields while syncing to the control plane cluster. See Patching synced resources for syntax, directionality, and examples.

Config reference​

For every field under sync.toHost.persistentVolumes, see the sync reference.