Enum PersistentVolumeReclaimPolicy

    • Enum Constant Detail

      • RETAIN

        @Stability(Stable)
        public static final PersistentVolumeReclaimPolicy RETAIN
        The Retain reclaim policy allows for manual reclamation of the resource.

        When the PersistentVolumeClaim is deleted, the PersistentVolume still exists and the volume is considered "released". But it is not yet available for another claim because the previous claimant's data remains on the volume. An administrator can manually reclaim the volume with the following steps:

        1. Delete the PersistentVolume. The associated storage asset in external infrastructure (such as an AWS EBS, GCE PD, Azure Disk, or Cinder volume) still exists after the PV is deleted.
        2. Manually clean up the data on the associated storage asset accordingly.
        3. Manually delete the associated storage asset.

        If you want to reuse the same storage asset, create a new PersistentVolume with the same storage asset definition.

      • DELETE

        @Stability(Stable)
        public static final PersistentVolumeReclaimPolicy DELETE
        For volume plugins that support the Delete reclaim policy, deletion removes both the PersistentVolume object from Kubernetes, as well as the associated storage asset in the external infrastructure, such as an AWS EBS, GCE PD, Azure Disk, or Cinder volume.

        Volumes that were dynamically provisioned inherit the reclaim policy of their StorageClass, which defaults to Delete. The administrator should configure the StorageClass according to users' expectations; otherwise, the PV must be edited or patched after it is created

    • Method Detail

      • values

        public static PersistentVolumeReclaimPolicy[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (PersistentVolumeReclaimPolicy c : PersistentVolumeReclaimPolicy.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static PersistentVolumeReclaimPolicy valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null