Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithKubernetesPersistentVolume

Method
📦 Aspire.Hosting.Kubernetes v13.6.5-preview.1.26559.7
func (IComputeResource) WithKubernetesPersistentVolume(volume KubernetesPersistentVolumeResource) IComputeResource

Signature

methodWithKubernetesPersistentVolumebuilder
Binds a workload to a Kubernetes persistent volume by matching volume name
WithKubernetesPersistentVolume(volume KubernetesPersistentVolumeResource) IComputeResource
volumeKubernetesPersistentVolumeResourceThe persistent volume resource to bind to.
IComputeResource

The same builder for chaining.

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

Applies to

This method applies to the following types:

typeCSharpAppResource
typeContainerResource
typeDotnetToolResource
typeExecutableResource
typeKubernetesAspireDashboardResource
typeProjectResource