This example shows how to make a static provisioned JuiceFS persistence volume (PV) mounted inside container.
In order to build the example, you need to provide a secret file secrets.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 podsAlso you can verify that data is written onto JuiceFS filesystem:
>> kubectl exec -ti juicefs-app -- tail -f /data/out.txt