Authors: Zhu Weiwei, Yin Min
JuiceFS profile
JuiceFS is a distributed file system designed for large amounts of data, using object storage for data persistence, avoiding duplication of wheels, and greatly reducing engineering complexity, allowing users to focus on solving metadata and access protocol challenges.
Using JuiceFS to store data, the data itself is persisted in object stores (for example, Amazon S3), and the metadata corresponding to the data can be persisted in Redis, MySQL, SQLite, and other databases depending on the scenario.
KubeSphere platform introduction
KubeSphere is an application-centric multi-tenant container platform built on top of Kubernetes that provides full-stack IT automation capabilities and simplifies enterprise DevOps workflows.
KubeSphere provides an operation and maintenance friendly wizard interface, even Kubernetes experience is not rich users, can be relatively easy to start management and use. It provides a Helm-based application marketplace that makes it very easy to install various Kubernetes applications under a visual interface.
This tutorial will show you how to deploy the JuiceFS CSI Driver in KubeSphere with one click to provide data persistence for various applications on the cluster.
The premise condition
- Install KubeSphere
- Enable the app Store in KubeSphere
- Preparing object Storage
- Create huawei cloud OBS
- Create a secret key
The deployment of Redis
Redis is a key component in the JuiceFS architecture, storing all metadata and responding to client operations on the metadata. Before deploying JuiceFS CSI Driver, you need to deploy a Redis database. For details on how to deploy JuiceFS CSI Driver, please refer to KubeSphere official documentation.
Deploy the JuiceFS CSI Driver
Since 3.2.0, KubeSphere has added the function of “dynamically loading app Store”. Partners can integrate the app’s Helm Chart into KubeSphere app Store by submitting a PR application, so that KubeSphere App Store can load apps dynamically. JuiceFS CSI Driver’s Helm Chart is now integrated into KubeSphere’s app store in this way, and users can deploy the JuiceFS CSI Driver to Kubernetes with one click.
Start by selecting the enterprise space and project you want to deploy.
After entering the project, click Create to deploy the new application.
Select “From the App Store”.
Click on the target application, and then click Deploy.
Modify backend parameters.
Validation service.
Deploy stateful applications
Create a stateful replica set.
Add a custom name.
Add a container image.
sh,-c,while true; do echo $(date -u) >> /data/out.txt; sleep 5; done
Copy the code
Example Add a storage volume template.
Check the status.
Verifying a storage volume
First verify the status of the CREATED PVC binding.
kubectl get pvc -n kubesphere
Copy the code
The stateful application is displayed to check the mounting status.
Log in to OBS to view file synchronization status.
Matters needing attention
- Any namespace can be used after JuiceFS CSI Driver is installed
- The POD to which the PVC belongs belongs to the namespace of the JuiceFS CSI Driver
- After creating an application, you must enter the specified folder to save data, and then the remote storage device will display data synchronously
This article is published by OpenWrite!