You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
2.1 KiB

  1. # CephFS Volume Provisioner for Kubernetes 1.5+
  2. [![Docker Repository on Quay](https://quay.io/repository/external_storage/cephfs-provisioner/status "Docker Repository on Quay")](https://quay.io/repository/external_storage/cephfs-provisioner)
  3. Using Ceph volume client
  4. ## Development
  5. Compile the provisioner
  6. ``` console
  7. make
  8. ```
  9. Make the container image and push to the registry
  10. ``` console
  11. make push
  12. ```
  13. ## Test instruction
  14. - Start Kubernetes local cluster
  15. See [Kubernetes](https://kubernetes.io/)
  16. - Create a Ceph admin secret
  17. ``` bash
  18. ceph auth get client.admin 2>&1 |grep "key = " |awk '{print $3'} |xargs echo -n > /tmp/secret
  19. kubectl create ns cephfs
  20. kubectl create secret generic ceph-secret-admin --from-file=/tmp/secret --namespace=cephfs
  21. ```
  22. - Start CephFS provisioner
  23. The following example uses `cephfs-provisioner-1` as the identity for the instance and assumes kubeconfig is at `/root/.kube`. The identity should remain the same if the provisioner restarts. If there are multiple provisioners, each should have a different identity.
  24. ``` bash
  25. docker run -ti -v /root/.kube:/kube -v /var/run/kubernetes:/var/run/kubernetes --privileged --net=host cephfs-provisioner /usr/local/bin/cephfs-provisioner -master=http://127.0.0.1:8080 -kubeconfig=/kube/config -id=cephfs-provisioner-1
  26. ```
  27. Alternatively, deploy it in kubernetes, see [deployment](deploy/README.md).
  28. - Create a CephFS Storage Class
  29. Replace Ceph monitor's IP in [example class](example/class.yaml) with your own and create storage class:
  30. ``` bash
  31. kubectl create -f example/class.yaml
  32. ```
  33. - Create a claim
  34. ``` bash
  35. kubectl create -f example/claim.yaml
  36. ```
  37. - Create a Pod using the claim
  38. ``` bash
  39. kubectl create -f example/test-pod.yaml
  40. ```
  41. ## Known limitations
  42. - Kernel CephFS doesn't work with SELinux, setting SELinux label in Pod's securityContext will not work.
  43. - Kernel CephFS doesn't support quota or capacity, capacity requested by PVC is not enforced or validated.
  44. - Currently each Ceph user created by the provisioner has `allow r` MDS cap to permit CephFS mount.
  45. ## Acknowledgement
  46. Inspired by CephFS Manila provisioner and conversation with John Spray