Persistent Storage
Overview
Persistent storage refers to the data generated by the application during operation that needs to be persistently saved.Such as databases, files, logs, etc.
Two types of storage are built in by default:
- Local storage
- Temporary storage
Local storage
Local storage is the default built-in storage type of Rainbond, providing a simple local storage solution that supports quick creation of local storage volumes and is suitable for various scenarios.
Local storage supports stateless and stateful component mounting, only supports single read and single write, and does not support multiple reads and writes.At the same time, components mounted with local storage will be fixed on the node where the storage is located and do not support cross-node scheduling.
By default, storage volumes are created in the /opt/rainbond/local-path-provisioner
directory on the host machine.
Temporary storage
Temporary storage is the default built-in storage type of Rainbond, providing a simple temporary storage solution that supports quick creation of temporary storage volumes and is suitable for various scenarios.
Add storage
On the component storage page, click Add Storage, select the storage type, fill in the storage name, storage size, storage path and other information, and click OK.
Share storage with other components
Local storage does not support sharing and mounting by multiple components, and stateful components are not allowed to mount storage from other components.
On the component storage page, click Add Storage, select the storage type as Share Storage with Other Components, select the component to share, fill in the storage path and other information, and click OK.
Connect to other storage
The Rainbond platform will detect the StorageClass resources existing in the Kubernetes cluster, and consider the StorageClass resource objects as user-defined storage types for the Rainbond console components to select and use.After the storage service connection is completed, you can select the connected storage type when adding storage.
Storage recycling
When a component is deleted, storage recycling will occur. Storage created with a specified StorageClass will be deleted or retained according to the storage recycling policy corresponding to the StorageClass.