How do I control a kubernetes PersistentVolumeClaim to bind to a specific PersistentVolume? How do I control a kubernetes PersistentVolumeClaim to bind to a specific PersistentVolume? kubernetes kubernetes

How do I control a kubernetes PersistentVolumeClaim to bind to a specific PersistentVolume?


The current implementation does not allow your PersistentVolumeClaim to target specific PersistentVolumes. Claims bind to volumes based on its capabilities (access modes) and capacity.

In the works is the next iteration of PersistentVolumes, which includes a PersistentVolumeSelector on the claim. This would work exactly like a NodeSelector on Pod works. The volume would have to match the label selector in order to bind. This is the targeting you are looking for.

Please see https://github.com/kubernetes/kubernetes/pull/17056 for the proposal containing PersistentVolumeSelector.