CSI-S3
Learn how to configure CSI-S3 for use with Filebase.
CSI-S3 is a container storage interface developed for S3-compatible storage. Container storage interfaces like CSI-S3 can dynamically allocate buckets and mount them via FUSE inside any container, such as Docker containers.
Read below to learn how to use CSI-S3 with Filebase.
- Confirm that Docker allows shared mounts, and Kubernetes allows privileged containers.
git clone https://github.com/CTrox/csi-s3
kubectl create secret filebase-config
By default, this will create a file located at
secret/filebase-config
apiVersion: v1
kind: Secret
metadata:
namespace: kube-namespace
name: csi-s3-secret
namespace: kube-namespace
stringData:
accessKeyID: FILEBASE_ACCESS_KEY
secretAccessKey: FILEBASE_SECRET_KEY
endpoint: https://s3.filebase.com
Replace the following values:
- FILEBASE_ACCESS_KEY: Filebase Access Key
- FILEBASE_SECRET_KEY: Filebase Secret Key
cd deploy/kubernetes
kubectl create -f provisioner.yaml
kubectl create -f attacher.yaml
kubectl create -f csi-s3.yaml
kubectl create -f examples/storageclass.yaml
kubectl create -f examples/pvc.yaml
Make sure that the PVC has been bound:
kubectl get pvc csi-s3-pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
csi-s3-pvc Bound pvc-c5d24383235-4634f8507-11e8-9f330e4b 5Gi RWO csi-s3 12m
Then create and start a test pod:
kubectl create -f examples/pod.yaml
CSI-S3 will create a new bucket for each volume you create by default. The bucket will match the Volume’s ID.
To set configure a custom bucket name, edit the
examples/storageclass.yaml
file to reflect the following content:kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: csi-s3-existing-bucket
provisioner: ch.ctrox.csi.s3-driver
parameters:
mounter: rclone
bucket: filebase-bucket name
Note: This requires rClone to be installed to mount the bucket locally. For more information on rClone, check out our documentation here.
If you have any questions, please join our Discord server, or send us an email at [email protected]
Last modified 9mo ago