Ceph rbd volumes in kubernetes pods

We are in need to utilize ceph rbd volumes in Kubernetes with Rancher either as persistent volume or direct mount in kubernetes templates. I think Rancher’s version of kubernetes doesn’t support it. I am sure somebody in community might have this figured out already, I would like to find out details on how it is done.

Thank you!

Hello @mtecer,

I enabled ceph in rancher-kuberentes:v1.4.0-rancher. I don’t have a ceph setup to test it right at this moment, but all versions going forward should theoretically have support for it.

Here’s the PR that i’ve made - https://github.com/rancher/kubernetes/pull/50/commits/010094f80c7135889fbcd8a1c3b0ad5271af06eb


Hi @wlan0,

Thank you for enabling ceph support in the image going forward.

I have 2 questions,
1- How can I build rancher-kuberentes:v1.4.0-rancher ? in order to test. I have ceph environment ready for this testing ?
2- Once this image is built, how can I swap out existing kubelet containers in v1.2.0-pre3 ?

Thank you for your time.

You need to install


in the kubelet and controller-manager containers

If you already have a running instance of rancher, log into the kubelet on each host and install these two utils (apt-get install -y ceph-common ceph-fs-common).

Also, do the same for controller-manager. You can then create RBD PV or ceph-fs PVs using kubectl. Let me know if this works.

Hi @wlan0,

I was able to get ceph rbd volumes mounted on kubernetes pods. It required more tweaks on kubelet containers to get it working properly. I will document those required steps here in my next post.

Thank you!