Skip to main content
RunBook Academy

CephLXXXIX · Rook ConceptsRook Concepts

Rook: Ceph as a Kubernetes operator

Intermediate⏱ ~17 minkubectlceph

What you'll learn

  • Describe what Rook does and does not manage
  • Identify the main custom resources
  • Explain the reconciliation model
  • Locate Ceph itself within a Rook deployment

Prerequisites

None — start here.

Verified against Ceph Tentacle 20.2.x · Ceph Squid 19.2.x (supported previous) · cephadm matches the verified Ceph release · podman 4.x · csi-rbd and csi-cephfs current · RBD / CephFS / RGW current (matches Ceph release) · Linux kernel 5.15+ (5.10 minimum) · Ubuntu 24.04 LTS (Ceph host baseline) · Debian 12 (Bookworm) (Ceph host baseline) · Rocky Linux / RHEL / AlmaLinux 9.x (Ceph host baseline) · Proxmox VE 9.x (cross-course integration) · Kubernetes 1.31+ (cross-course integration) · 2026-08-18

Not yet marked complete on this device.

Why this matters in production

Rook runs Ceph inside Kubernetes and manages it declaratively. The Ceph underneath is the same Ceph; what differs is how it is operated.

What Rook manages

flowchart TD
  A[CephCluster CR] --> B[Rook operator]
  B --> C[MON pods]
  B --> D[MGR pods]
  B --> E[OSD pods]
  B --> F[MDS / RGW pods]
  G[CephBlockPool CR] --> B
  B --> H[Ceph pools]
Managed by RookNot managed by Rook
Daemon placement and lifecycleCeph’s internal behaviour
Pool and filesystem creationCRUSH tuning beyond the CR fields
Ceph-CSI deploymentapplication data
Upgrades of CephKubernetes itself
Device discovery and OSD provisioningnode hardware

The custom resources

apiVersion: ceph.rook.io/v1
kind: CephCluster
metadata:
  name: rook-ceph
  namespace: rook-ceph
spec:
  cephVersion:
    image: quay.io/ceph/ceph:v19
  dataDirHostPath: /var/lib/rook
  mon:
    count: 3
    allowMultiplePerNode: false
  storage:
    useAllNodes: true
    useAllDevices: false
    deviceFilter: "^sd[b-z]"
apiVersion: ceph.rook.io/v1
kind: CephBlockPool
metadata:
  name: replicapool
  namespace: rook-ceph
spec:
  failureDomain: host
  replicated:
    size: 3
ResourceCreates
CephClusterthe cluster and its daemons
CephBlockPoolan RBD pool
CephFilesystema CephFS filesystem and its MDS
CephObjectStorean RGW deployment and its pools
CephClienta cephx user
CephBlockPoolRadosNamespacean RBD namespace

The reconciliation model

Declare desired state in a CR
  → the operator observes the difference
  → it acts to converge
  → it continues observing

This differs from imperative management in a consequential way: changes made directly to Ceph that contradict a CR are reverted by the operator.

# a pool's size changed directly
ceph osd pool set replicapool size 2
# the operator reconciles it back to the CR's value
kubectl -n rook-ceph get cephblockpool replicapool -o jsonpath='{.spec.replicated.size}'

Managing Ceph settings that Rook owns must be done through the CRs.

Locating Ceph within Rook

kubectl -n rook-ceph get pods
kubectl -n rook-ceph exec -it deploy/rook-ceph-tools -- ceph -s
kubectl -n rook-ceph exec -it deploy/rook-ceph-tools -- ceph osd tree

The toolbox pod provides the ordinary Ceph CLI against the cluster, and everything learned about Ceph applies unchanged from there.

kubectl -n rook-ceph get cephcluster rook-ceph -o jsonpath='{.status.ceph.health}'

Quiz

Knowledge check · 4 questions

  1. Q1. A pool's size is changed with `ceph osd pool set` in a Rook cluster. What happens?

  2. Q2. Everything learned about diagnosing and repairing Ceph transfers unchanged to a Rook cluster.

  3. Q3. Investigate a Ceph problem in a Rook cluster.

    A Rook-managed Ceph cluster reports HEALTH_WARN. The team is unsure whether to use Ceph commands or Rook resources to investigate.

  4. Q4. Which Ceph settings must be changed through Rook custom resources rather than the CLI?

Passing score: 75%. Answers are checked in this browser.

Production discipline

Change anything Rook expresses in a custom resource through that resource — the operator reconciles direct Ceph changes away, often minutes later, which makes the reversion hard to attribute. Diagnose through the toolbox pod with the ordinary Ceph CLI; the cluster underneath is standard Ceph.

Cross-course references

  • Kubernetes: operators reconciling away manual changes is universal controller behaviour
  • Linux: configuration management systems revert out-of-band changes the same way