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.

78 lines
2.3 KiB

  1. CephFS Volume Provisioner for Kubernetes 1.5+
  2. =============================================
  3. [![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)
  4. Using Ceph volume client
  5. Development
  6. -----------
  7. Compile the provisioner
  8. ``` console
  9. make
  10. ```
  11. Make the container image and push to the registry
  12. ``` console
  13. make push
  14. ```
  15. Test instruction
  16. ----------------
  17. - Start Kubernetes local cluster
  18. See <a href="https://kubernetes.io/" class="uri" class="uri">https://kubernetes.io/</a>.
  19. - Create a Ceph admin secret
  20. ``` bash
  21. ceph auth get client.admin 2>&1 |grep "key = " |awk '{print $3'} |xargs echo -n > /tmp/secret
  22. kubectl create ns cephfs
  23. kubectl create secret generic ceph-secret-admin --from-file=/tmp/secret --namespace=cephfs
  24. ```
  25. - Start CephFS provisioner
  26. 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.
  27. ``` bash
  28. 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
  29. ```
  30. Alternatively, deploy it in kubernetes, see [deployment](deploy/README.md).
  31. - Create a CephFS Storage Class
  32. Replace Ceph monitor's IP in <a href="example/class.yaml" class="uri" class="uri">example/class.yaml</a> with your own and create storage class:
  33. ``` bash
  34. kubectl create -f example/class.yaml
  35. ```
  36. - Create a claim
  37. ``` bash
  38. kubectl create -f example/claim.yaml
  39. ```
  40. - Create a Pod using the claim
  41. ``` bash
  42. kubectl create -f example/test-pod.yaml
  43. ```
  44. Known limitations
  45. -----------------
  46. - Kernel CephFS doesn't work with SELinux, setting SELinux label in Pod's securityContext will not work.
  47. - Kernel CephFS doesn't support quota or capacity, capacity requested by PVC is not enforced or validated.
  48. - Currently each Ceph user created by the provisioner has `allow r` MDS cap to permit CephFS mount.
  49. Acknowledgement
  50. ---------------
  51. Inspired by CephFS Manila provisioner and conversation with John Spray