Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

AddPersistentVolume

Method
📦 Aspire.Hosting.Kubernetes v13.6.5-preview.1.26559.7
func (KubernetesEnvironmentResource) AddPersistentVolume(name string) KubernetesPersistentVolumeResource

Signature

methodAddPersistentVolumebuilder
Adds a Kubernetes PersistentVolumeClaim resource
AddPersistentVolume(name string) KubernetesPersistentVolumeResource
namestringThe name of the persistent volume resource. Used as the generated PVC's metadata.name after lower-casing. To bind a workload using the name-match overload of WithPersistentVolume, add a WithVolume("name", "/path") on the workload using the same name.
KubernetesPersistentVolumeResource

A builder for the new KubernetesPersistentVolumeResource.

Returns a handle; failures surface later via Err().

Applies to

This method applies to the following types: