Share via


VolumeV1 Class

Definition

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.

[YamlDotNet.Serialization.YamlSerializable]
public sealed class VolumeV1
[<YamlDotNet.Serialization.YamlSerializable>]
type VolumeV1 = class
Public NotInheritable Class VolumeV1
Inheritance
VolumeV1
Attributes
YamlDotNet.Serialization.YamlSerializableAttribute

Constructors

VolumeV1()

Properties

ConfigMap

Represents the Kubernetes ConfigMap volume source configuration.

EmptyDir

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

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

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

Represents the configuration for an image-based volume source within a Kubernetes Volume definition.

Name

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

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

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.

Applies to