| _output | ||
| .github/workflows | ||
| cmd/seaweedfs-csi-driver | ||
| deploy | ||
| pkg/driver | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
Container Storage Interface (CSI) for SeaweedFs
Container storage interface is an industry standard that enables storage vendors to develop a plugin once and have it work across a number of container orchestration systems.
SeaweedFS is a simple and highly scalable distributed file system, to store and serve billions of files fast!
Deployment (Kubernetes)
Prerequisites:
- Already have a working Kubernetes cluster (includes
kubectl) - Already have a working SeaweedFS cluster
Utilize existing SeaweedFS storage for your Kubernetes cluster (bare metal)
-
Git clone this repository and add your SeaweedFS master IP to
deploy/kubernetes/seaweedfs-csi.yaml(2 places) -
Apply the container storage interface for SeaweedFS for your cluster
$ kubectl apply -f deploy/kubernetes/seaweedfs-csi.yaml
- Ensure all the containers are ready and running
$ kubectl get po -n kube-system
- Testing: Create a persistant volume claim for 5GiB with name
seaweedfs-csi-pvcwith storage classseaweedfs-storage. The value, 5Gib does not have any significance as for SeaweedFS the whole filesystem is mounted into the container.
$ kubectl apply -f deploy/kubernetes/sample-seaweedfs-pvc.yaml
- Verify if the persistant volume claim exists and wait until its the STATUS is
Bound
$ kubectl get pvc
- After its in
Boundstate, create a sample workload mounting that volume
$ kubectl apply -f deploy/kubernetes/sample-busybox-pod.yaml
- Verify the storage mount of the busybox pod
$ kubectl exec my-csi-app -- df -h
- Clean up
$ kubectl delete -f deploy/kubernetes/sample-busybox-pod.yaml
$ kubectl delete -f deploy/kubernetes/sample-seaweedfs-pvc.yaml
$ kubectl delete -f deploy/kubernetes/seaweedfs-csi.yaml
Deployment by helm chart
- Clone project
git clone https://github.com/seaweedfs/seaweedfs-csi-driver.git
- Install
helm install --set seaweedfsFiler=<filerHost:port> seaweedfs-csi-driver ./seaweedfs-csi-driver/deploy/helm/seaweedfs-csi-driver
- Clean up
helm uninstall seaweedfs-csi-driver
Safe rollout update
When update DaemonSet ( DS ) break processes who implements fuse mount. And now new pod not remount net device
For better safe update use node.updateStrategy.type: OnDelete in this need manual update. Steps:
- delete DS pods on node where no exists seaweefs PV
- cordon or taint node
- evict or delete pods with seaweedfs PV
- delete DS pod on node
- uncordon or remove taint on node
- repeat all steps on all nodes
License
Code of conduct
Participation in this project is governed by Kubernetes/CNCF code of conduct