Automatically upgrade of JuiceFS Client in JuiceFS CSI Driver image is now supported, and can be disabled. JuiceFS Client will upgrade automatically everytime before mounting a PersistentVolume if enabled. We also offer different ways to control this function:

If you are using JuiceFS CSI Driver image with latest tag, then auto-upgrade is enabled by default. JuiceFS Client will try to upgrade itself everytime before mounting, a very short check time will be taken if no upgrade.

If you have pinned JuiceFS CSI Driver to a specific version, then auto-upgrade is disabled by default. You can still enable this through environment variables:

juicefs-secret is the name of Kubernetes Secret containing credentials
for JuiceFS and object storage access, including name, token, accesskey,
secretkey. You should create the filesystem manually, to meet the requirement of StorageClass. Every persistent volume is a subdirectory of the JuiceFS volume. An example command to create Secret is shown below:

When volume provisioning is invoked, the parameters and all referenced secrets
in StorageClass are passed to the CSI plugin “csi.juicefs.com” via a
CreateVolume call. In response, the JuiceFS CSI driver provisions a new
volume and then automatically create a PersistentVolume object to represent
the new volume. Kubernetes then binds the new PersistentVolume object to
the PersistentVolumeClaim, making it ready to use.

Dynamic provisioning making it splendidly easy to create/delete persistent
storage for applications. In case you want to access contents in an existing
JuiceFS file system, pre-provisioned volume will be the right solution.

Note

Since JuiceFS is an elastic filesystem it doesn’t really enforce any filesystem
capacity. The actual storage capacity value in persistence volume and persistence
volume claim is not used when creating the filesystem. However, since the storage
capacity is a required field by Kubernetes, you must specify the value and you
can use any valid value e.g. 10Pi for the capacity.

You can always create a PersistenVolume to mount a pre-existing JuiceFS
file system. and exposed in Kubernetes. The following PersistentVolume, for
example, exposes the JuiceFs file system “juicefs-name” to the CSI driver with
the name “juicefs-pv”.

The Kubernetes implementation of the Container Storage Interface (CSI) has been
promoted to GA in the Kubernetes v1.13 release.
Support for CSI was introduced as alpha in Kubernetes v1.9 release, and
promoted to beta in the Kubernetes v1.10 release.

To use JuiceFS in earlier versions of Kubernetes, try flexVolume or
hostPath.