I've successfully deployed a Kubernetes cluster using the docker-multinode configuration as well as a Ceph cluster and am able to mount a CephFS device manually using the following:
sudo mount -t ceph monitor1:6789:/ /ceph -o name=admin,secretfile=/etc/ceph/cephfs.secret
I'm now attempting to launch a pod using the kubernetes example here:
apiVersion: v1
kind: Secret
metadata:
name: ceph-secret
data:
key: my-ceph-secret-key
---
apiVersion: v1
kind: Pod
metadata:
name: cephfs2
spec:
containers:
- name: cephfs-rw
image: kubernetes/pause
volumeMounts:
- mountPath: "/mnt/cephfs"
name: cephfs
volumes:
- name: cephfs
cephfs:
monitors:
- "monitor1:6789"
- "monitor2:6789"
- "monitor3:6789"
user: admin
secretRef:
name: ceph-secret
readOnly: false
When I run:
sudo kubectl create -f cephfs.yml
I am receiving the following error:
Warning FailedMount MountVolume.SetUp failed for volume "kubernetes.io/cephfs/445ee063-d1f1-11e6-a3e3-1418776a29a6-cephfs" (spec.Name: "cephfs") pod "445ee063-d1f1-11e6-a3e3-1418776a29a6" (UID: "445ee063-d1f1-11e6-a3e3-1418776a29a6") with: CephFS: mount failed: mount failed: fork/exec /bin/mount: invalid argument Mounting arguments: monitor1:6789,monitor2:6789,monitor3:6789:/data /var/lib/kubelet/pods/445ee063-d1f1-11e6-a3e3-1418776a29a6/volumes/kubernetes.io~cephfs/cephfs ceph [name=admin,secret=secret]
Do the kubernetes manager containers need to have the ceph-fs-common package installed in order to perform a successful mount? I cannot find any further debugging information to determine the cause of the error.