Interface Volume
-
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
Volume.Jsii$Proxy
@Generated(value="jsii-pacmak/1.88.0 (build eaabd08)", date="2023-09-11T06:17:58.847Z") @Stability(Stable) public interface Volume extends software.amazon.jsii.JsiiSerializable
Volume represents a named volume in a pod that may be accessed by any container in the pod.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classVolume.BuilderA builder forVolumestatic classVolume.Jsii$ProxyAn implementation forVolume
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static Volume.Builderbuilder()default AwsElasticBlockStoreVolumeSourcegetAwsElasticBlockStore()awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod.default AzureDiskVolumeSourcegetAzureDisk()azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.default AzureFileVolumeSourcegetAzureFile()azureFile represents an Azure File Service mount on the host and bind mount to the pod.default CephFsVolumeSourcegetCephfs()cephFS represents a Ceph FS mount on the host that shares a pod's lifetime.default CinderVolumeSourcegetCinder()cinder represents a cinder volume attached and mounted on kubelets host machine.default ConfigMapVolumeSourcegetConfigMap()configMap represents a configMap that should populate this volume.default CsiVolumeSourcegetCsi()csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).default DownwardApiVolumeSourcegetDownwardApi()downwardAPI represents downward API about the pod that should populate this volume.default EmptyDirVolumeSourcegetEmptyDir()emptyDir represents a temporary directory that shares a pod's lifetime.default EphemeralVolumeSourcegetEphemeral()ephemeral represents a volume that is handled by a cluster storage driver.default FcVolumeSourcegetFc()fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.default FlexVolumeSourcegetFlexVolume()flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.default FlockerVolumeSourcegetFlocker()flocker represents a Flocker volume attached to a kubelet's host machine.default GcePersistentDiskVolumeSourcegetGcePersistentDisk()gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod.default GitRepoVolumeSourcegetGitRepo()gitRepo represents a git repository at a particular revision.default GlusterfsVolumeSourcegetGlusterfs()glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime.default HostPathVolumeSourcegetHostPath()hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container.default IscsiVolumeSourcegetIscsi()iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod.StringgetName()name of the volume.default NfsVolumeSourcegetNfs()nfs represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs.default PersistentVolumeClaimVolumeSourcegetPersistentVolumeClaim()persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace.default PhotonPersistentDiskVolumeSourcegetPhotonPersistentDisk()photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine.default PortworxVolumeSourcegetPortworxVolume()portworxVolume represents a portworx volume attached and mounted on kubelets host machine.default ProjectedVolumeSourcegetProjected()projected items for all in one resources secrets, configmaps, and downward API.default QuobyteVolumeSourcegetQuobyte()quobyte represents a Quobyte mount on the host that shares a pod's lifetime.default RbdVolumeSourcegetRbd()rbd represents a Rados Block Device mount on the host that shares a pod's lifetime.default ScaleIoVolumeSourcegetScaleIo()scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.default SecretVolumeSourcegetSecret()secret represents a secret that should populate this volume.default StorageOsVolumeSourcegetStorageos()storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.default VsphereVirtualDiskVolumeSourcegetVsphereVolume()vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine.
-
-
-
Method Detail
-
getName
@Stability(Stable) @NotNull String getName()
name of the volume.Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
getAwsElasticBlockStore
@Stability(Stable) @Nullable default AwsElasticBlockStoreVolumeSource getAwsElasticBlockStore()
awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod.More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
-
getAzureDisk
@Stability(Stable) @Nullable default AzureDiskVolumeSource getAzureDisk()
azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
-
getAzureFile
@Stability(Stable) @Nullable default AzureFileVolumeSource getAzureFile()
azureFile represents an Azure File Service mount on the host and bind mount to the pod.
-
getCephfs
@Stability(Stable) @Nullable default CephFsVolumeSource getCephfs()
cephFS represents a Ceph FS mount on the host that shares a pod's lifetime.
-
getCinder
@Stability(Stable) @Nullable default CinderVolumeSource getCinder()
cinder represents a cinder volume attached and mounted on kubelets host machine.More info: https://examples.k8s.io/mysql-cinder-pd/README.md
-
getConfigMap
@Stability(Stable) @Nullable default ConfigMapVolumeSource getConfigMap()
configMap represents a configMap that should populate this volume.
-
getCsi
@Stability(Stable) @Nullable default CsiVolumeSource getCsi()
csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).
-
getDownwardApi
@Stability(Stable) @Nullable default DownwardApiVolumeSource getDownwardApi()
downwardAPI represents downward API about the pod that should populate this volume.
-
getEmptyDir
@Stability(Stable) @Nullable default EmptyDirVolumeSource getEmptyDir()
emptyDir represents a temporary directory that shares a pod's lifetime.More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
-
getEphemeral
@Stability(Stable) @Nullable default EphemeralVolumeSource getEphemeral()
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.
-
getFc
@Stability(Stable) @Nullable default FcVolumeSource getFc()
fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
-
getFlexVolume
@Stability(Stable) @Nullable default FlexVolumeSource getFlexVolume()
flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.
-
getFlocker
@Stability(Stable) @Nullable default FlockerVolumeSource getFlocker()
flocker represents a Flocker volume attached to a kubelet's host machine.This depends on the Flocker control service being running
-
getGcePersistentDisk
@Stability(Stable) @Nullable default GcePersistentDiskVolumeSource getGcePersistentDisk()
gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod.More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
-
getGitRepo
@Stability(Stable) @Nullable default GitRepoVolumeSource getGitRepo()
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.
-
getGlusterfs
@Stability(Stable) @Nullable default GlusterfsVolumeSource getGlusterfs()
glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime.More info: https://examples.k8s.io/volumes/glusterfs/README.md
-
getHostPath
@Stability(Stable) @Nullable default HostPathVolumeSource getHostPath()
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
-
getIscsi
@Stability(Stable) @Nullable default IscsiVolumeSource getIscsi()
iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod.More info: https://examples.k8s.io/volumes/iscsi/README.md
-
getNfs
@Stability(Stable) @Nullable default NfsVolumeSource getNfs()
nfs represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs.
-
getPersistentVolumeClaim
@Stability(Stable) @Nullable default PersistentVolumeClaimVolumeSource getPersistentVolumeClaim()
persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace.More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
-
getPhotonPersistentDisk
@Stability(Stable) @Nullable default PhotonPersistentDiskVolumeSource getPhotonPersistentDisk()
photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine.
-
getPortworxVolume
@Stability(Stable) @Nullable default PortworxVolumeSource getPortworxVolume()
portworxVolume represents a portworx volume attached and mounted on kubelets host machine.
-
getProjected
@Stability(Stable) @Nullable default ProjectedVolumeSource getProjected()
projected items for all in one resources secrets, configmaps, and downward API.
-
getQuobyte
@Stability(Stable) @Nullable default QuobyteVolumeSource getQuobyte()
quobyte represents a Quobyte mount on the host that shares a pod's lifetime.
-
getRbd
@Stability(Stable) @Nullable default RbdVolumeSource getRbd()
rbd represents a Rados Block Device mount on the host that shares a pod's lifetime.More info: https://examples.k8s.io/volumes/rbd/README.md
-
getScaleIo
@Stability(Stable) @Nullable default ScaleIoVolumeSource getScaleIo()
scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
-
getSecret
@Stability(Stable) @Nullable default SecretVolumeSource getSecret()
secret represents a secret that should populate this volume.More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
-
getStorageos
@Stability(Stable) @Nullable default StorageOsVolumeSource getStorageos()
storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.
-
getVsphereVolume
@Stability(Stable) @Nullable default VsphereVirtualDiskVolumeSource getVsphereVolume()
vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine.
-
builder
@Stability(Stable) static Volume.Builder builder()
- Returns:
- a
Volume.BuilderofVolume
-
-