Class V1Volume
Volume represents a named volume in a pod that may be accessed by any container
in the pod.
Assembly: KubernetesClient.dll
Syntax
public record V1Volume : IEquatable<V1Volume>
Constructors
View Source
V1Volume()
Declaration
View Source
V1Volume(V1Volume)
Declaration
protected V1Volume(V1Volume original)
Parameters
Properties
View Source
AwsElasticBlockStore
awsElasticBlockStore represents an AWS Disk resource that is attached to a
kubelet's host machine and then exposed to the pod. Deprecated:
AWSElasticBlockStore is deprecated. All operations for the in-tree
awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. More
info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
Declaration
[JsonPropertyName("awsElasticBlockStore")]
public V1AWSElasticBlockStoreVolumeSource AwsElasticBlockStore { get; set; }
Property Value
View Source
AzureDisk
azureDisk represents an Azure Data Disk mount on the host and bind mount to the
pod. Deprecated: AzureDisk is deprecated. All operations for the in-tree
azureDisk type are redirected to the disk.csi.azure.com CSI driver.
Declaration
[JsonPropertyName("azureDisk")]
public V1AzureDiskVolumeSource AzureDisk { get; set; }
Property Value
View Source
AzureFile
azureFile represents an Azure File Service mount on the host and bind mount to
the pod. Deprecated: AzureFile is deprecated. All operations for the in-tree
azureFile type are redirected to the file.csi.azure.com CSI driver.
Declaration
[JsonPropertyName("azureFile")]
public V1AzureFileVolumeSource AzureFile { get; set; }
Property Value
View Source
Cephfs
cephFS represents a Ceph FS mount on the host that shares a pod's lifetime.
Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer
supported.
Declaration
[JsonPropertyName("cephfs")]
public V1CephFSVolumeSource Cephfs { get; set; }
Property Value
View Source
Cinder
cinder represents a cinder volume attached and mounted on kubelets host machine.
Deprecated: Cinder is deprecated. All operations for the in-tree cinder type are
redirected to the cinder.csi.openstack.org CSI driver. More info:
https://examples.k8s.io/mysql-cinder-pd/README.md
Declaration
[JsonPropertyName("cinder")]
public V1CinderVolumeSource Cinder { get; set; }
Property Value
View Source
ConfigMap
configMap represents a configMap that should populate this volume
Declaration
[JsonPropertyName("configMap")]
public V1ConfigMapVolumeSource ConfigMap { get; set; }
Property Value
View Source
Csi
csi (Container Storage Interface) represents ephemeral storage that is handled
by certain external CSI drivers.
Declaration
[JsonPropertyName("csi")]
public V1CSIVolumeSource Csi { get; set; }
Property Value
View Source
DownwardAPI
downwardAPI represents downward API about the pod that should populate this
volume
Declaration
[JsonPropertyName("downwardAPI")]
public V1DownwardAPIVolumeSource DownwardAPI { get; set; }
Property Value
View Source
EmptyDir
Declaration
[JsonPropertyName("emptyDir")]
public V1EmptyDirVolumeSource EmptyDir { get; set; }
Property Value
View Source
Ephemeral
ephemeral represents a volume that is handled by a cluster storage driver. The
volume's lifecycle is tied to the pod that defines it - it will be created
before the pod starts, and deleted when the pod is removed.
Use this if: a) the volume is only needed while the pod runs, b) features of
normal volumes like restoring from snapshot or capacity
tracking are needed,
c) the storage driver is specified through a storage class, and d) the storage
driver supports dynamic volume provisioning through
a PersistentVolumeClaim (see EphemeralVolumeSource for more
information on the connection between this volume type
and PersistentVolumeClaim).
Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that
persist for longer than the lifecycle of an individual pod.
Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to
be used that way - see the documentation of the driver for more information.
A pod can use both types of ephemeral volumes and persistent volumes at the same
time.
Declaration
[JsonPropertyName("ephemeral")]
public V1EphemeralVolumeSource Ephemeral { get; set; }
Property Value
View Source
EqualityContract
Declaration
protected virtual Type EqualityContract { get; }
Property Value
View Source
Fc
fc represents a Fibre Channel resource that is attached to a kubelet's host
machine and then exposed to the pod.
Declaration
[JsonPropertyName("fc")]
public V1FCVolumeSource Fc { get; set; }
Property Value
View Source
FlexVolume
flexVolume represents a generic volume resource that is provisioned/attached
using an exec based plugin. Deprecated: FlexVolume is deprecated. Consider using
a CSIDriver instead.
Declaration
[JsonPropertyName("flexVolume")]
public V1FlexVolumeSource FlexVolume { get; set; }
Property Value
View Source
Flocker
flocker represents a Flocker volume attached to a kubelet's host machine. This
depends on the Flocker control service being running. Deprecated: Flocker is
deprecated and the in-tree flocker type is no longer supported.
Declaration
[JsonPropertyName("flocker")]
public V1FlockerVolumeSource Flocker { get; set; }
Property Value
View Source
GcePersistentDisk
gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's
host machine and then exposed to the pod. Deprecated: GCEPersistentDisk is
deprecated. All operations for the in-tree gcePersistentDisk type are redirected
to the pd.csi.storage.gke.io CSI driver. More info:
https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
Declaration
[JsonPropertyName("gcePersistentDisk")]
public V1GCEPersistentDiskVolumeSource GcePersistentDisk { get; set; }
Property Value
View Source
GitRepo
gitRepo represents a git repository at a particular revision. Deprecated:
GitRepo is deprecated. To provision a container with a git repo, mount an
EmptyDir into an InitContainer that clones the repo using git, then mount the
EmptyDir into the Pod's container.
Declaration
[JsonPropertyName("gitRepo")]
public V1GitRepoVolumeSource GitRepo { get; set; }
Property Value
View Source
Glusterfs
glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime.
Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer
supported.
Declaration
[JsonPropertyName("glusterfs")]
public V1GlusterfsVolumeSource Glusterfs { get; set; }
Property Value
View Source
HostPath
hostPath represents a pre-existing file or directory on the host machine that is
directly exposed to the container. This is generally used for system agents or
other privileged things that are allowed to see the host machine. Most
containers will NOT need this. More info:
https://kubernetes.io/docs/concepts/storage/volumes#hostpath
Declaration
[JsonPropertyName("hostPath")]
public V1HostPathVolumeSource HostPath { get; set; }
Property Value
View Source
Image
image represents an OCI object (a container image or artifact) pulled and
mounted on the kubelet's host machine. The volume is resolved at pod startup
depending on which PullPolicy value is provided:
- Always: the kubelet always attempts to pull the reference. Container creation
will fail If the pull fails. - Never: the kubelet never pulls the reference and
only uses a local image or artifact. Container creation will fail if the
reference isn't present. - IfNotPresent: the kubelet pulls if the reference
isn't already present on disk. Container creation will fail if the reference
isn't present and the pull fails.
The volume gets re-resolved if the pod gets deleted and recreated, which means
that new remote content will become available on pod recreation. A failure to
resolve or pull the image during pod startup will block containers from starting
and may add significant latency. Failures will be retried using normal volume
backoff and will be reported on the pod reason and message. The types of objects
that may be mounted by this volume are defined by the container runtime
implementation on a host machine and at minimum must include all valid types
supported by the container image field. The OCI object gets mounted in a single
directory (spec.containers[].volumeMounts.mountPath) by merging the manifest
layers in the same way as for container images. The volume will be mounted
read-only (ro) and non-executable files (noexec). Sub path mounts for containers
are not supported (spec.containers[].volumeMounts.subpath) before 1.33. The
field spec.securityContext.fsGroupChangePolicy has no effect on this volume
type.
Declaration
[JsonPropertyName("image")]
public V1ImageVolumeSource Image { get; set; }
Property Value
View Source
Iscsi
Declaration
[JsonPropertyName("iscsi")]
public V1ISCSIVolumeSource Iscsi { get; set; }
Property Value
View Source
Name
Declaration
[JsonPropertyName("name")]
public string Name { get; set; }
Property Value
View Source
Nfs
Declaration
[JsonPropertyName("nfs")]
public V1NFSVolumeSource Nfs { get; set; }
Property Value
View Source
PersistentVolumeClaim
Declaration
[JsonPropertyName("persistentVolumeClaim")]
public V1PersistentVolumeClaimVolumeSource PersistentVolumeClaim { get; set; }
Property Value
View Source
PhotonPersistentDisk
photonPersistentDisk represents a PhotonController persistent disk attached and
mounted on kubelets host machine. Deprecated: PhotonPersistentDisk is deprecated
and the in-tree photonPersistentDisk type is no longer supported.
Declaration
[JsonPropertyName("photonPersistentDisk")]
public V1PhotonPersistentDiskVolumeSource PhotonPersistentDisk { get; set; }
Property Value
View Source
PortworxVolume
portworxVolume represents a portworx volume attached and mounted on kubelets
host machine. Deprecated: PortworxVolume is deprecated. All operations for the
in-tree portworxVolume type are redirected to the pxd.portworx.com CSI driver
when the CSIMigrationPortworx feature-gate is on.
Declaration
[JsonPropertyName("portworxVolume")]
public V1PortworxVolumeSource PortworxVolume { get; set; }
Property Value
View Source
Projected
projected items for all in one resources secrets, configmaps, and downward API
Declaration
[JsonPropertyName("projected")]
public V1ProjectedVolumeSource Projected { get; set; }
Property Value
View Source
Quobyte
quobyte represents a Quobyte mount on the host that shares a pod's lifetime.
Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer
supported.
Declaration
[JsonPropertyName("quobyte")]
public V1QuobyteVolumeSource Quobyte { get; set; }
Property Value
View Source
Rbd
rbd represents a Rados Block Device mount on the host that shares a pod's
lifetime. Deprecated: RBD is deprecated and the in-tree rbd type is no longer
supported.
Declaration
[JsonPropertyName("rbd")]
public V1RBDVolumeSource Rbd { get; set; }
Property Value
View Source
ScaleIO
scaleIO represents a ScaleIO persistent volume attached and mounted on
Kubernetes nodes. Deprecated: ScaleIO is deprecated and the in-tree scaleIO type
is no longer supported.
Declaration
[JsonPropertyName("scaleIO")]
public V1ScaleIOVolumeSource ScaleIO { get; set; }
Property Value
View Source
Secret
Declaration
[JsonPropertyName("secret")]
public V1SecretVolumeSource Secret { get; set; }
Property Value
View Source
Storageos
storageOS represents a StorageOS volume attached and mounted on Kubernetes
nodes. Deprecated: StorageOS is deprecated and the in-tree storageos type is no
longer supported.
Declaration
[JsonPropertyName("storageos")]
public V1StorageOSVolumeSource Storageos { get; set; }
Property Value
View Source
VsphereVolume
vsphereVolume represents a vSphere volume attached and mounted on kubelets host
machine. Deprecated: VsphereVolume is deprecated. All operations for the in-tree
vsphereVolume type are redirected to the csi.vsphere.vmware.com CSI driver.
Declaration
[JsonPropertyName("vsphereVolume")]
public V1VsphereVirtualDiskVolumeSource VsphereVolume { get; set; }
Property Value
Methods
View Source
Equals(object?)
Declaration
public override bool Equals(object? obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Overrides
View Source
Equals(V1Volume?)
Declaration
public virtual bool Equals(V1Volume? other)
Parameters
Returns
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
View Source
PrintMembers(StringBuilder)
Declaration
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
Returns
View Source
ToString()
Declaration
public override string ToString()
Returns
Overrides
Operators
View Source
operator ==(V1Volume?, V1Volume?)
Declaration
public static bool operator ==(V1Volume? left, V1Volume? right)
Parameters
Returns
View Source
operator !=(V1Volume?, V1Volume?)
Declaration
public static bool operator !=(V1Volume? left, V1Volume? right)
Parameters
Returns
Implements