Intro to Ceph on Kubernetes using Rook at FOSDEM'23

Intro to Ceph on Kubernetes using Rook at FOSDEM'23

We were at FOSDEM'23 in Brussels, Belgium! FOSDEM is a free and open-source event for software developers to meet, share ideas and collaborate.

Our talk “Intro to Ceph on Kubernetes using Rook” was part of the Software Defined Storage dev room.

In our talk, we gave an intro to Rook. We introduced Rook with a focus on talking about the concepts of an operator in Kubernetes (reconciliation loop) and the rook-ceph krew plugin. That is what the abstraction of Kubernetes allows you to do and enables the Rook and many other operators out there. There are a lot of operator projects available that can deploy, configure and manage simple to complex applications for you.

That is what Rook is, it is an operator to run a Ceph storage cluster in your Kubernetes cluster. Easily manageable through Kubernetes-native-ways and a lot of YAML. Assume the following, you have a Ceph cluster using Rook and a new Ceph release has been released. Just one line change in the “definition” of your CephCluster custom resource and the operator takes care of analyzing the current state and acting upon it to ensure the new desired state is achieved.

Operator Reconciliation Loop

This is what Kubernetes is basically all about: Defining a desired state, a reconciliation loop is running to ensure the desired state is always achieved when possible.

The simplest loop to think of is when you have an application running on Kubernetes with at least 2 pods, each running on separate nodes and one of these nodes fails. Kubernetes logic will detect at some point that a node is down and the reconciliation loops behind a Deployment will take care of getting a new pod of your application running so that you are back to the desired state of 2 pods (replicas).

Enough talk about operators and loops, let’s look at the rook-ceph krew plugin. The rook-ceph krew plugin enables users to easily run ceph commands, get the cluster health status and even go through certain disaster recovery scenarios. This is great for anyone running a Rook Ceph cluster that needs to interact with it for whatever reason.

Here’s a snippet from the help menu of the rook-ceph krew plugin:

kubectl rook-ceph --help Output Snippet

Instead of having to manually enter the Rook Ceph toolbox pod, the plugin handles it automatically and even provides some shortcuts to common commands and makes troubleshooting easier as well.

The rook-ceph krew plugin is currently rewritten using the Golang programming language to make it easier to test for the future. If you want to learn more, be sure to check out our post about our talk at the Ceph Virtual Summit 2022 and the recording here.

The recording of our talk is available here (video.fosdem.org).

Thanks to the FOSDEM and dev rooms organizers, and anyone who has asked questions and watched the talk!

Alexander Trost February 13, 2023