Class Volume


  • public final class Volume
    extends java.lang.Object
    • Method Detail

      • awsElasticBlockStore

        public java.util.Optional<AWSElasticBlockStoreVolumeSource> awsElasticBlockStore()
        Returns:
        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
      • azureDisk

        public java.util.Optional<AzureDiskVolumeSource> azureDisk()
        Returns:
        azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
      • azureFile

        public java.util.Optional<AzureFileVolumeSource> azureFile()
        Returns:
        azureFile represents an Azure File Service mount on the host and bind mount to the pod.
      • cephfs

        public java.util.Optional<CephFSVolumeSource> cephfs()
        Returns:
        cephFS represents a Ceph FS mount on the host that shares a pod's lifetime
      • cinder

        public java.util.Optional<CinderVolumeSource> cinder()
        Returns:
        cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
      • configMap

        public java.util.Optional<ConfigMapVolumeSource> configMap()
        Returns:
        configMap represents a configMap that should populate this volume
      • csi

        public java.util.Optional<CSIVolumeSource> csi()
        Returns:
        csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).
      • downwardAPI

        public java.util.Optional<DownwardAPIVolumeSource> downwardAPI()
        Returns:
        downwardAPI represents downward API about the pod that should populate this volume
      • emptyDir

        public java.util.Optional<EmptyDirVolumeSource> emptyDir()
        Returns:
        emptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
      • ephemeral

        public java.util.Optional<EphemeralVolumeSource> ephemeral()
        Returns:
        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.
      • fc

        public java.util.Optional<FCVolumeSource> fc()
        Returns:
        fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
      • flexVolume

        public java.util.Optional<FlexVolumeSource> flexVolume()
        Returns:
        flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.
      • flocker

        public java.util.Optional<FlockerVolumeSource> flocker()
        Returns:
        flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running
      • gcePersistentDisk

        public java.util.Optional<GCEPersistentDiskVolumeSource> gcePersistentDisk()
        Returns:
        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
      • gitRepo

        public java.util.Optional<GitRepoVolumeSource> gitRepo()
        Returns:
        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.
      • glusterfs

        public java.util.Optional<GlusterfsVolumeSource> glusterfs()
        Returns:
        glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md
      • hostPath

        public java.util.Optional<HostPathVolumeSource> hostPath()
        Returns:
        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
      • iscsi

        public java.util.Optional<ISCSIVolumeSource> iscsi()
        Returns:
        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
      • name

        public java.lang.String name()
        Returns:
        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
      • nfs

        public java.util.Optional<NFSVolumeSource> nfs()
        Returns:
        nfs represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
      • persistentVolumeClaim

        public java.util.Optional<PersistentVolumeClaimVolumeSource> persistentVolumeClaim()
        Returns:
        persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
      • photonPersistentDisk

        public java.util.Optional<PhotonPersistentDiskVolumeSource> photonPersistentDisk()
        Returns:
        photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine
      • portworxVolume

        public java.util.Optional<PortworxVolumeSource> portworxVolume()
        Returns:
        portworxVolume represents a portworx volume attached and mounted on kubelets host machine
      • projected

        public java.util.Optional<ProjectedVolumeSource> projected()
        Returns:
        projected items for all in one resources secrets, configmaps, and downward API
      • quobyte

        public java.util.Optional<QuobyteVolumeSource> quobyte()
        Returns:
        quobyte represents a Quobyte mount on the host that shares a pod's lifetime
      • rbd

        public java.util.Optional<RBDVolumeSource> rbd()
        Returns:
        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
      • scaleIO

        public java.util.Optional<ScaleIOVolumeSource> scaleIO()
        Returns:
        scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
      • secret

        public java.util.Optional<SecretVolumeSource> secret()
        Returns:
        secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
      • storageos

        public java.util.Optional<StorageOSVolumeSource> storageos()
        Returns:
        storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.
      • vsphereVolume

        public java.util.Optional<VsphereVirtualDiskVolumeSource> vsphereVolume()
        Returns:
        vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine