Is there an Uplink storage driver for Kubernetes?

Alternatively, is there a way to use the Docker storage driver as a Kubernetes storage driver in the pod deployment YAML?

My goal is to have a Kubernetes persistent volume claim using a Storj DCS - backed Kubernetes persistent volume where the storage driver implements Uplink Go library directly or to mount a Storj DCS bucket directly on a pod using the Storj driver for Docker.

Do you have an opinion about which would be better? With more thought it seems like mounting directly on the container is most efficient and a more discrete allocation of the storage resource (a bucket with a more specific purpose), but it also seems like a general-purpose Storj bucket as a k8s persistent volume could make sense, even if slightly less performant.

Does this help ?

It’s certainly relevant because it would allow me to backup and restore my k8s storage with Velero, but I’m after a realtime storage solution that’s backed by Storj.

The Kubernetes Backup via Velero guide does use Storj as backend, see also GitHub - storj/velero-plugin: Velero object store plugin that is backed by Storj (note that Tardigrade was the previous name for what is now called Storj DCS).

1 Like

You can try to use this project: GitHub - datashim-io/datashim: A kubernetes based framework for hassle free handling of datasets
It should provide the ability to create PVC for volume stored in the bucket.
S3 creds you can generate like this: Quickstart - AWS CLI and Hosted Gateway MT | Storj Docs or access register | Storj Docs

But I would like to have a native integration with Storj DCS too.

The storage driver itself for Kubernetes (or more precisely the implementation of Container Storage Interface) is very lightweight. Doesn’t really specify how the storage should be mounted. It’s just an interface to create volume and/or mount the volume.

It depends on the implementation how is it mounted.

Therefore the tricky part in supporting any new storage is the mounting, not the CSI itself.

I see 3 possible ways to do it:

  • Using s3 fuse driver (goofys)
  • Using rclone mount command
  • Using native uplink fuse driver

First (s3 fuse). is the most stable. I used GitHub - ctrox/csi-s3: A Container Storage Interface for S3 earlier with GitHub - kahing/goofys: a high-performance, POSIX-ish Amazon S3 file system written in Go and had good experience (didn’t test myself with Storj, but it should work). One limitation is that this approach uses the shared gateway.

Second (rclone mount) can be better to use native protocol. I found a csi driver, but I have never tested it: GitHub - wunderio/csi-rclone: CSI driver for rclone

Third option can be the best, I know that there were attempts of creating fuse drivers for storj (like this one: GitHub - JessicaGreben/storj-fusefs: A read-only fuse filesystem for Storj file object storage.), but I don’t know any native CSI driver (however it’s relative easy to implement).