Enum PersistentVolumeAccessMode

    • Enum Constant Detail

      • READ_WRITE_ONCE

        @Stability(Stable)
        public static final PersistentVolumeAccessMode READ_WRITE_ONCE
        The volume can be mounted as read-write by a single node.

        ReadWriteOnce access mode still can allow multiple pods to access the volume when the pods are running on the same node.

      • READ_ONLY_MANY

        @Stability(Stable)
        public static final PersistentVolumeAccessMode READ_ONLY_MANY
        The volume can be mounted as read-only by many nodes.
      • READ_WRITE_MANY

        @Stability(Stable)
        public static final PersistentVolumeAccessMode READ_WRITE_MANY
        The volume can be mounted as read-write by many nodes.
      • READ_WRITE_ONCE_POD

        @Stability(Stable)
        public static final PersistentVolumeAccessMode READ_WRITE_ONCE_POD
        The volume can be mounted as read-write by a single Pod.

        Use ReadWriteOncePod access mode if you want to ensure that only one pod across whole cluster can read that PVC or write to it. This is only supported for CSI volumes and Kubernetes version 1.22+.

    • Method Detail

      • values

        public static PersistentVolumeAccessMode[] 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 (PersistentVolumeAccessMode c : PersistentVolumeAccessMode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static PersistentVolumeAccessMode 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