123DevOps··7 min read

What is Rook? Ceph on Kubernetes with block, file, and object storage

Learn what Rook is, how it runs Ceph inside Kubernetes to provide block (RBD), file (CephFS), and object (RGW) storage, what the minimum requirements are, and how to create a CephCluster, a CephBlockPool, and a StorageClass.

Kubernetes

In the cloud, a PVC becomes a managed disk in seconds. On bare metal, in your own datacenter, or at the edge, there is no ready-made “EBS”: someone has to turn the servers’ disks into replicated volumes that survive a node failure. Ceph does this very well, but running it by hand is a lot of work. Rook exists to move that work into Kubernetes itself.

If PV, PVC, StorageClass, and CSI are still new to you, read Kubernetes storage in practice first. This post builds on those concepts.

What Rook is

Rook is a storage operator for Kubernetes, and its backend is Ceph, a mature distributed storage system that provides block, file, and object storage from the same cluster. Rook doesn’t reimplement Ceph: it deploys the Ceph daemons as pods, configures everything from CRDs, and reacts to failures and changes the way a human operator would.

Rook joined the CNCF in January 2018, moved to Incubating in September 2018, and has been a Graduated project since October 2020. That is its status as of November 2026; check the project page. The release marked Latest on GitHub that same month was v1.21.3, and the docs for that line support the Squid (v19) and Tentacle (v20) Ceph releases.

What problem it solves

  • Persistent storage without a cloud: it turns local disks across several nodes into replicated volumes, with dynamic provisioning through CSI.
  • Three interfaces in one cluster: block volumes for databases, a shared file system (RWX) for multiple replicas, and S3-compatible buckets.
  • Declarative operations: instead of running ceph and editing config files on every server, you describe the cluster in YAML, version it in Git, and let the operator converge.
  • Lifecycle: Ceph upgrades, disk replacements, and new nodes become changes to Kubernetes resources.

How it works

The operator (rook-ceph-operator) watches the CRDs in the ceph.rook.io/v1 group and creates the Ceph daemons. Pods reach their volumes through the Ceph CSI drivers, which Rook also installs.

Component Role
rook-ceph-operator Watches the CRDs and creates, updates, and recovers the Ceph daemons
MON (monitors) Keep the cluster map and quorum; 3 is the recommended count
MGR (managers) Metrics, dashboard, and orchestration modules
OSD One daemon per disk; stores the data and handles replication
MDS CephFS metadata; only exists if there is a CephFilesystem
RGW S3-compatible HTTP gateway; only exists if there is a CephObjectStore
Ceph CSI (RBD and CephFS) Provisions and mounts volumes into pods based on StorageClasses

Each storage type maps to a set of resources:

Type Ceph interface Main CRD How the application consumes it
Block RBD CephBlockPool RWO PVC, provisioner rook-ceph.rbd.csi.ceph.com
File CephFS CephFilesystem RWX PVC, provisioner rook-ceph.cephfs.csi.ceph.com
Object RGW CephObjectStore ObjectBucketClaim or an S3 user (CephObjectStoreUser)

Minimum requirements

The prerequisites page is very specific, and ignoring it is the most common reason a cluster “won’t create OSDs”:

  • Kubernetes v1.32 through v1.37, on amd64 or arm64 (for the v1.21 line).
  • At least one kind of local storage per node: raw disks, raw partitions, LVM logical volumes, or PVs in Block mode from a StorageClass. No file system: if lsblk -f shows anything under FSTYPE, Rook skips the device.
  • lvm2 installed on the nodes when you use encryption, a metadata device, or more than one OSD per disk.
  • udev running on every storage node.
  • The rbd kernel module (test it with modprobe rbd); for CephFS, kernel 4.17 or newer is the recommended minimum, otherwise PVC sizes aren’t enforced.
  • Three worker nodes for the production cluster.yaml, since the default replication is 3 with a host failure domain.

Hands-on example

The documented install uses the manifests from a release tag (never from the main branch). The alternative is Helm, with the rook-ceph (operator) and rook-ceph-cluster charts:

git clone --single-branch --branch v1.21.3 https://github.com/rook/rook.git
cd rook/deploy/examples
kubectl create -f crds.yaml -f common.yaml -f csi-operator.yaml
kubectl create -f operator.yaml
kubectl -n rook-ceph get pod   # wait for rook-ceph-operator to be Running

# Alternative with Helm (operator only)
helm repo add rook-release https://charts.rook.io/release
helm install --create-namespace --namespace rook-ceph rook-ceph rook-release/rook-ceph -f values.yaml

With the operator running, describe the cluster and the block pool. The example below explicitly lists one disk per node, which is safer than useAllDevices: true (the docs don’t recommend it outside tightly controlled environments):

apiVersion: ceph.rook.io/v1
kind: CephCluster
metadata:
  name: rook-ceph
  namespace: rook-ceph
spec:
  cephVersion:
    image: quay.io/ceph/ceph:v20.2.4
  dataDirHostPath: /var/lib/rook
  mon:
    count: 3
    allowMultiplePerNode: false
  mgr:
    count: 2
  dashboard:
    enabled: true
  storage:
    useAllNodes: false
    useAllDevices: false
    nodes:
      - name: "worker-1"
        devices:
          - name: "sdb"
      - name: "worker-2"
        devices:
          - name: "sdb"
      - name: "worker-3"
        devices:
          - name: "sdb"
---
apiVersion: ceph.rook.io/v1
kind: CephBlockPool
metadata:
  name: replicapool
  namespace: rook-ceph
spec:
  failureDomain: host
  replicated:
    size: 3

Now the StorageClass that uses the RBD CSI provisioner, and a PVC that consumes it. This is a trimmed version of the official storageclass.yaml; in production, start from the file for your version:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: rook-ceph-block
provisioner: rook-ceph.rbd.csi.ceph.com
parameters:
  clusterID: rook-ceph
  pool: replicapool
  imageFormat: "2"
  imageFeatures: layering
  csi.storage.k8s.io/provisioner-secret-name: rook-csi-rbd-provisioner
  csi.storage.k8s.io/provisioner-secret-namespace: rook-ceph
  csi.storage.k8s.io/controller-expand-secret-name: rook-csi-rbd-provisioner
  csi.storage.k8s.io/controller-expand-secret-namespace: rook-ceph
  csi.storage.k8s.io/node-stage-secret-name: rook-csi-rbd-node
  csi.storage.k8s.io/node-stage-secret-namespace: rook-ceph
  csi.storage.k8s.io/fstype: ext4
reclaimPolicy: Delete
allowVolumeExpansion: true
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: postgres-data
  namespace: your-app
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: rook-ceph-block
  resources:
    requests:
      storage: 20Gi

To check health, use the Rook toolbox (toolbox.yaml in the same examples folder). You want HEALTH_OK, monitors in quorum, and every OSD up and in:

kubectl -n rook-ceph get cephcluster
kubectl -n rook-ceph exec -it deploy/rook-ceph-tools -- ceph status
kubectl -n rook-ceph exec -it deploy/rook-ceph-tools -- ceph osd tree

When to use it (and when not to)

It makes sense when:

  • You run Kubernetes on bare metal, on-premises, or in a private cloud and need replicated storage with dynamic provisioning.
  • You need RWX (CephFS) or your own S3 object storage, and want a single system for all three types.
  • The team has Ceph knowledge, or is willing to build it. Rook automates operations, but you still need to understand PGs, OSDs, and recovery.

Avoid it when:

  • You’re on a public cloud with managed disks. The provider’s CSI driver (EBS, Persistent Disk, Azure Disk) is simpler and already replicated.
  • The cluster has one or two nodes, or nodes without dedicated disks. Ceph with fewer than three storage nodes loses most of its point.
  • The network is slow or unreliable. Ceph replication is sensitive to latency between nodes.

Alternatives

Option Type When to consider it
Cloud provider CSI Block (and file, for some) Clusters on a public cloud
Longhorn Distributed block Bare metal or edge with simpler operations, no native object storage
External Ceph + Ceph CSI Block, file, and object A Ceph cluster already exists outside Kubernetes (Rook also supports an “external cluster” mode)
MinIO and similar Object only You only need S3, not volumes
Local storage (local PV) Local block Databases that replicate on their own and tolerate losing the node

If your goal is to speed up reads of datasets that already live in remote storage, rather than to store data, look at Fluid.

Summary

  • Rook is a CNCF Graduated operator that runs and manages Ceph inside Kubernetes
  • A single cluster provides block (RBD), file (CephFS), and object (RGW) storage
  • Disks without a file system, the rbd module, udev, and three worker nodes are prerequisites
  • Install from a release tag or from the rook-ceph and rook-ceph-cluster charts
  • List devices per node instead of using useAllDevices: true in production
  • CephBlockPool + a rook-ceph.rbd.csi.ceph.com StorageClass = dynamic RWO PVCs
  • Watch ceph status through the toolbox and only move on with HEALTH_OK

Rook automates Ceph, but it doesn’t make it magic: disks, network, and team knowledge are still the foundation.

Get updates on new posts and stay in the loop!