1 # CephFS Volume Provisioner for Kubernetes 1.5+
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)
5 Using Ceph volume client
9 Compile the provisioner
15 Make the container image and push to the registry
23 - Start Kubernetes local cluster
25 See [Kubernetes](https://kubernetes.io/)
27 - Create a Ceph admin secret
30 ceph auth get client.admin 2>&1 |grep "key = " |awk '{print $3'} |xargs echo -n > /tmp/secret
31 kubectl create ns cephfs
32 kubectl create secret generic ceph-secret-admin --from-file=/tmp/secret --namespace=cephfs
35 - Start CephFS provisioner
37 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.
40 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
43 Alternatively, deploy it in kubernetes, see [deployment](deploy/README.md).
45 - Create a CephFS Storage Class
47 Replace Ceph monitor's IP in [example class](example/class.yaml) with your own and create storage class:
50 kubectl create -f example/class.yaml
56 kubectl create -f example/claim.yaml
59 - Create a Pod using the claim
62 kubectl create -f example/test-pod.yaml
67 - Kernel CephFS doesn't work with SELinux, setting SELinux label in Pod's securityContext will not work.
68 - Kernel CephFS doesn't support quota or capacity, capacity requested by PVC is not enforced or validated.
69 - Currently each Ceph user created by the provisioner has `allow r` MDS cap to permit CephFS mount.
73 Inspired by CephFS Manila provisioner and conversation with John Spray