# VolumeV1

- Kind: `class`
- Package: [Aspire.Hosting.Kubernetes](/reference/api/csharp/aspire.hosting.kubernetes.md)
- Version: `13.3.0-preview.1.26254.5`
- Namespace: `Aspire.Hosting.Kubernetes.Resources`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/VolumeV1.cs)

Represents a volume configuration definition within a Kubernetes pod. This class allows specifying different types of volume sources such as Image, HostPath, Persistent Volume Claim, ConfigMap, Secret, and others, enabling configuration of data storage in a pod.

## Definition

```csharp
namespace Aspire.Hosting.Kubernetes.Resources;

public sealed class VolumeV1
{
    // ...
}
```

## Constructors

- [VolumeV1](/reference/api/csharp/aspire.hosting.kubernetes/volumev1/constructors.md#constructor)

## Properties

- [ConfigMap](/reference/api/csharp/aspire.hosting.kubernetes/volumev1/properties.md#configmap) : [ConfigMapVolumeSourceV1?](/reference/api/csharp/aspire.hosting.kubernetes/configmapvolumesourcev1.md) `get; set` -- Represents the Kubernetes ConfigMap volume source configuration.
- [EmptyDir](/reference/api/csharp/aspire.hosting.kubernetes/volumev1/properties.md#emptydir) : [EmptyDirVolumeSourceV1?](/reference/api/csharp/aspire.hosting.kubernetes/emptydirvolumesourcev1.md) `get; set` -- Gets or sets the configuration for an EmptyDir volume source in Kubernetes. An EmptyDir volume is a temporary storage directory that is created empty when a pod is assigned to a node. The volume's contents only exist for the lifetime of the pod and will be deleted when the pod is removed.
- [Ephemeral](/reference/api/csharp/aspire.hosting.kubernetes/volumev1/properties.md#ephemeral) : [EphemeralVolumeSourceV1?](/reference/api/csharp/aspire.hosting.kubernetes/ephemeralvolumesourcev1.md) `get; set` -- Gets or sets the configuration for an ephemeral volume associated with the resource. An ephemeral volume is a transient storage volume tied to the lifecycle of a pod. This property allows specifying the template for a PersistentVolumeClaim that defines the parameters of the ephemeral volume.
- [HostPath](/reference/api/csharp/aspire.hosting.kubernetes/volumev1/properties.md#hostpath) : [HostPathVolumeSourceV1?](/reference/api/csharp/aspire.hosting.kubernetes/hostpathvolumesourcev1.md) `get; set` -- Gets or sets the HostPath volume source for the volume. HostPath volume sources allow mounting a file or directory from the host node's filesystem into a pod. This is typically used for scenarios like accessing host filesystem resources or sharing data between containers in a pod.
- [Image](/reference/api/csharp/aspire.hosting.kubernetes/volumev1/properties.md#image) : [ImageVolumeSourceV1?](/reference/api/csharp/aspire.hosting.kubernetes/imagevolumesourcev1.md) `get; set` -- Represents the configuration for an image-based volume source within a Kubernetes Volume definition.
- [Name](/reference/api/csharp/aspire.hosting.kubernetes/volumev1/properties.md#name) : `string` `get; set` -- Gets or sets the name of the volume. This property is used to identify the volume within the context of a Kubernetes resource. It is a required value and must be unique among all defined volumes in a specific resource.
- [PersistentVolumeClaim](/reference/api/csharp/aspire.hosting.kubernetes/volumev1/properties.md#persistentvolumeclaim) : [PersistentVolumeClaimVolumeSourceV1?](/reference/api/csharp/aspire.hosting.kubernetes/persistentvolumeclaimvolumesourcev1.md) `get; set` -- Represents a PersistentVolumeClaim (PVC) that will be mounted as a volume in a Kubernetes environment. A PVC is a request for storage by a user, and this property links the volume configuration to an existing claim.
- [Secret](/reference/api/csharp/aspire.hosting.kubernetes/volumev1/properties.md#secret) : [SecretVolumeSourceV1?](/reference/api/csharp/aspire.hosting.kubernetes/secretvolumesourcev1.md) `get; set` -- Represents a secret volume source in Kubernetes. This property is used to specify configuration details for a volume that retrieves data from a Kubernetes Secret resource.
