Skip to content
DocsTry Aspire
DocsTry

K3sClusterResource.withDataVolume

Method
📦 CommunityToolkit.Aspire.Hosting.K3s v13.5.0
interface K3sClusterResource {
// ... omitted for brevity
withDataVolume(name?: string): K3sClusterResource;
}

Signature

methodwithDataVolumebuilder
Mounts a named Docker volume at the k3s data directory so cluster state persists across AppHost restarts.
withDataVolume(name?: string): K3sClusterResource
namestringoptional
K3sClusterResource

Defined on

This method is defined on the following type: