A volume, in simple terms, refers to a directory existing on a disk or within a container. Typically, the lifespan of a volume is the same as the Pod that encapsulates it. When the Pod ceases to exist, the volume disappears as well.
However, in some cases, it may be necessary to preserve the data on the disk even if the Pod disappears. In such cases, persistent volumes (PVs) are used.
Regular Volumes: Supports emptyDir and hostPath methods.
Persistent Volumes (PVs): Supports Single type (usable only on one node) and Shared type (can be shared across multiple nodes).
When users input the minimum required information for a persistent volume, Cocktail Cloud automatically generates related Persistent Volume (PV) and Persistent Volume Claim (PVC) resources and matches the PVC with the corresponding PV.
Developers only need to select the PVC created in the configured Pod to set up volume and volume mounts.
Create volume requests
View volume requests
Use volumes in containers
1) Go to [Application] - [Service Map] - [Volume Requests], then click the "+ Create" button in the top right to move to the volume request creation screen.
1) Access the volume request screen in the service map to check the list of volume requests created by the user.
1) Click on the "Name" of the volume request you want to check in the volume request list.
2) To view detailed information about the created PVC in YAML format, click the settings button on the top screen, then select "YAML View" from the left checkbox.
1) Select the "Volume (PV)" of the volume request you want to check in the volume request list.
2) To view detailed information about the created PV in YAML format, go to the "Settings" tab on the top screen.
1) Select the workload that will use the volume request, then click the "Settings" tab to go to the detailed workload configuration screen.
1) Click the "+ Add" button in the volume section of the workload configuration information.
2) Choose the desired volume type and enter the corresponding volume name.
The volume type field can be Empty Dir, Host Path, Config Map, Secret, Persistent Volume, and additional input information may be required based on the selected volume type.
3) After completing the volume type and volume name, click the "Apply" button to save.
After adding a volume, it needs to be mounted in the workload to be used.
1) Click the "+ Add" button in the volume addition section of the workload configuration information.
2) Select the container and volume to mount, then click the "+ Add" button.
3) Specify the path to mount the volume in the container.
The container field and volume selection field can be created if containers and volumes already exist.
The container path field is a mandatory input.
4) Click the "Apply" button to create the volume mount.
1) After adding volumes and configuring volume mounts, click the "Save and Start" button at the top right of the workload's detailed configuration screen.
2) You can check that the configured volume and volume request are applied by confirming that the container restarts.
Item (* is required) | Content |
---|---|
Name*
Write the name of the volume request you want to create
Persistent Volume type*
Choose between SINGLE and SHARED
Storage*
Select the pre-registered storage
Access Mode*
If you choose SINGLE for the storage volume type, only ReadWriteOnce can be selected in the access mode
If you choose SHARED for the storage volume type, ReadWriteMany and ReanOnlyMany can be selected in the access mode.
Capacity(GB)*
Enter the volume amount to be created (only positive integers are allowed)
Label
Input labels to be registered for volume request creation
Annotation
Input Annotation to be registered for volume request creation