This example shows how to make a dynamic provisioned JuiceFS persistence volume (PV) mounted inside container.
In order to build the example, you need to provide a secret file Secret-juicefs.env
containing the required credentials
name=<juicefs-name>
token=<juicefs-token>
accesskey=<juicefs-accesskey>
secretkey=<juicefs-secretkey>
Build the example with kustomize and apply with kubectl
kustomize build | kubectl apply -f -
or apply with kubectl >= 1.14
kubectl apply -k .
After the objects are created, verify that pod is running:
>> kubectl get pods
Also you can verify that data is written onto JuiceFS filesystem:
>> kubectl exec -ti juicefs-app -- tail -f /data/out.txt
Check for the directory created as PV https://juicefs.com/console/vol//