If your Ceph cluster is already configured with CephFS, then you can assign it very easily to pods. Also, CephFS supports ReadWriteMany access modes.
The configuration is similar to Ceph RBD, except you don't have a pool, image, or filesystem type. The secret can be a reference to a Kubernetes secret object (preferred) or a secret file:
apiVersion: v1
kind: Pod
metadata:
name: cephfs
spec:
containers:
- name: cephfs-rw
image: kubernetes/pause
volumeMounts:
- mountPath: "/mnt/cephfs"
name: cephfs
volumes:
- name: cephfs
cephfs:
monitors:
- 10.16.154.78:6789
- 10.16.154.82:6789
- 10.16.154.83:6789
user: admin
secretFile: "/etc/ceph/admin.secret"
readOnly: true
You can also provide a path as a parameter in the cephfs system. The default is /.
The in-tree RBD provisioner has an out-of-tree copy in the external-storage Kubernetes incubator project.