Rook: Ceph on Kubernetes

Khimananda Oli 7 min read Database
Rook: Ceph on Kubernetes

By Khimananda Oli | Last reviewed: August 2026

Stateful workloads on Kubernetes fail without reliable persistent storage, and cloud-native teams increasingly turn to Rook: Ceph on Kubernetes to solve this. Unlike external storage arrays or basic hostPath volumes, Rook automates the deployment, bootstrapping, and management of a full Ceph storage cluster directly inside your K8s environment. This guide walks you through a production-ready implementation based on real-world deployments I have managed across bare-metal and hybrid environments.

How does Rook: Ceph on Kubernetes architecture work?

Understanding the architecture prevents costly misconfigurations during initial setup. Rook operates as two distinct layers: the Rook Operator and the Ceph Daemons. The operator is a lightweight controller that watches for Custom Resources (CRDs) like CephCluster, CephBlockPool, and CephFilesystem. When you apply these manifests, the operator translates your desired state into actual Kubernetes resources—Deployments, DaemonSets, Services, and ConfigMaps—that run the Ceph daemons.

Rook OperatorWatches CRDsManages LifecycleCeph DaemonsMON / MGR / OSDMDS / RGWApp PodsPVC ConsumersRBD / CephFSKubernetes API ServerCRDs: CephCluster, CephBlockPool, CephFilesystemPV / PVC Binding & Provisioning
Rook: Ceph on Kubernetes architecture: the operator reconciles CRDs to manage Ceph daemons serving application PVCs

The critical distinction here is separation of concerns. The operator never handles data; it only orchestrates. Your application pods interact solely with Ceph through the CSI driver, completely unaware of Rook's existence. This means if the operator pod crashes temporarily, existing volumes remain fully functional. For teams evaluating alternatives, I compare this pattern against simpler options in my Longhorn distributed storage guide, but Rook’s maturity makes it the default choice for complex stateful workloads requiring POSIX compliance or S3 compatibility.

How do you install and configure Rook: Ceph on Kubernetes?

Installation requires careful sequencing. Skipping prerequisites causes silent failures during OSD bootstrap. Always verify your nodes have raw, unformatted disks dedicated to Ceph before proceeding.

Step 1: Deploy the Rook Operator

Add the official Helm repository and install the operator. Using Helm simplifies future upgrades significantly compared to raw manifests.

helm repo add rook-release https://charts.rook.io/release
helm repo update

helm install --create-namespace --namespace rook-ceph \
  rook-ceph rook-release/rook-ceph \
  --set csi.cephFSPlugin.enabled=true \
  --set csi.rbdPlugin.enabled=true \
  --version v1.16.0

Wait for the operator pod to reach Ready status. Check logs immediately for RBAC errors or missing CRD registrations:

kubectl -n rook-ceph rollout status deployment/rook-ceph-operator
kubectl -n rook-ceph logs -l app=rook-ceph-operator --tail=100

Step 2: Create the CephCluster Resource

This is where most production issues originate. Below is a minimal viable configuration for a three-node cluster with dedicated OSD devices. Never use useAllDevices: true in production—it risks consuming system disks.

apiVersion: ceph.rook.io/v1
kind: CephCluster
metadata:
  name: rook-ceph
  namespace: rook-ceph
spec:
  cephVersion:
    image: quay.io/ceph/ceph:v19.2.0
  dataDirHostPath: /var/lib/rook
  mon:
    count: 3
    allowMultiplePerNode: false
  mgr:
    count: 2
    modules:
      - name: dashboard
        enabled: true
  storage:
    useAllNodes: false
    useAllDevices: false
    nodes:
      - name: node-01
        devices:
          - name: sdb
      - name: node-02
        devices:
          - name: sdb
      - name: node-03
        devices:
          - name: sdb
  resources:
    osd:
      requests:
        cpu: "1"
        memory: "2Gi"
      limits:
        memory: "4Gi"

Apply this manifest and monitor progress. The operator creates MON pods first, then MGR, then OSDs. Full cluster convergence typically takes 5–15 minutes depending on disk speed and network latency.

Step 3: Define Storage Classes

Create a CephBlockPool and corresponding StorageClass for RBD volumes. This enables standard PVC claims from applications.

apiVersion: ceph.rook.io/v1
kind: CephBlockPool
metadata:
  name: replicapool
  namespace: rook-ceph
spec:
  failureDomain: host
  replicated:
    size: 3
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: rook-ceph-block
provisioner: rook-ceph.rbd.csi.ceph.com
parameters:
  pool: replicapool
  clusterID: rook-ceph
reclaimPolicy: Delete
allowVolumeExpansion: true

If you need shared filesystem access for multi-pod read-write scenarios (like WordPress or Jenkins), create a CephFilesystem resource separately. Understanding when to use block versus file storage aligns with broader Kubernetes persistent volume best practices.

What are the common production pitfalls with Rook Ceph?

After managing multiple Rook clusters in audit-sensitive environments, certain failure modes recur consistently. Addressing these proactively prevents 3 AM pages.

  • Insufficient MON quorum: Running fewer than three monitors risks split-brain during node maintenance. Always deploy odd numbers (3 or 5).
  • Missing resource limits: Unbounded OSD pods can consume all node memory during rebalancing, triggering OOM kills. Always set explicit requests and limits as shown above.
  • Ignoring PG autoscaling: Manual placement group tuning is obsolete. Enable pg_autoscale_mode: on in pool specs to let Ceph adjust dynamically.
  • No monitoring integration: Ceph exposes rich Prometheus metrics at :9283/metrics. Without dashboards, you cannot detect degradation before user impact. See my Prometheus and Grafana monitoring stack guide for integration patterns.
  • Skipping backup validation: Rook manages storage, not backups. Implement regular snapshot schedules and test restores quarterly. Compliance frameworks like SOC 2 require evidence of recoverability.
Pitfall DetectedOSD OOM / MON LossDiagnose Root CauseCheck Logs / MetricsApply Fix & HardenSet Limits / Add MONsPrevention Checklist✓ Minimum 3 MONs, odd count only✓ Explicit CPU/memory limits on all OSD pods✓ PG autoscaler enabled on all pools✓ Prometheus scraping configured for :9283✓ Quarterly restore tests documented
Production pitfall response workflow for Rook: Ceph on Kubernetes clusters

How does Rook Ceph compare to other Kubernetes storage options?

Choosing storage involves trade-offs between complexity, performance, and operational overhead. This comparison reflects 2026 production realities, not marketing claims.

CriteriaRook-CephLonghornCloud CSI (EBS/PD)
Storage TypesBlock, File, ObjectBlock onlyBlock (+ NFS gateway)
Data LocalityConfigurable (host/zone)Replica per nodeZone/Region bound
Operational ComplexityHigh (Ceph expertise needed)Low (UI-driven)Minimal (managed)
Bare Metal SupportExcellentGoodN/A
S3/Object StorageNative (RGW)NoSeparate service
Best ForMulti-protocol, large scaleSimple block, small teamsCloud-native apps

In practice, I recommend Rook when you need object storage alongside block volumes, operate on bare metal, or require POSIX-compliant shared filesystems. For teams running exclusively in AWS/Azure/GCP with simple database workloads, native CSI drivers reduce operational burden significantly. Longhorn fills a niche for smaller clusters needing straightforward replication without Ceph’s learning curve. Evaluate your actual protocol requirements before defaulting to any single solution.

How do you monitor and maintain a Rook Ceph cluster?

Day-2 operations determine long-term success. Rook exposes comprehensive telemetry, but raw metrics are useless without context.

  1. Enable the Ceph Dashboard: Already activated in the cluster spec above. Access it via port-forward or Ingress. Use it for visual health checks, not automation.
  2. Configure Prometheus ServiceMonitor: Rook ships a ready-to-use ServiceMonitor. Apply it to enable automatic metric scraping. Key alerts include CephHealthErr, CephOSDNearFull, and CephMonQuorumLost.
  3. Implement log aggregation: Ceph logs are verbose. Forward them to your centralized logging system with structured parsing. My structured logging guide covers filtering noise effectively.
  4. Schedule regular health checks: Automate ceph status and ceph df outputs weekly. Track trends in PG states and OSD utilization over time.
  5. Test upgrade paths in staging: Never upgrade Ceph versions directly in production. Validate compatibility with your specific workload patterns first.
Ceph Daemons:9283/metricsHealth / PG / OSDServiceMonitorAuto-discoveryScrape ConfigPrometheusStorage & AlertsRule EvaluationGrafanaDashboardsAlertmanagerCritical Metrics to Watch• ceph_health_status (0=OK, 1=WARN, 2=ERR)• ceph_osd_up vs ceph_osd_in (detect outages)• ceph_pool_bytes_used / max_avail (capacity)• ceph_pg_active + stale + undersized (health)
Monitoring pipeline for Rook: Ceph on Kubernetes from daemon metrics to actionable dashboards

Next Steps for Production Rook Deployments

Deploying Rook: Ceph on Kubernetes successfully requires treating it as a platform component, not an afterthought. Start with the configuration patterns above, validate thoroughly in non-production, and integrate monitoring before onboarding real workloads. Document your recovery procedures and test them regularly—compliance auditors and incident responders will thank you. If your team needs hands-on support designing or hardening a Rook deployment, especially for regulated environments, reach out to discuss your specific requirements.

Frequently Asked Questions

Rook is an open-source storage orchestrator that automates deploying and managing Ceph clusters on Kubernetes, providing persistent block, object, and file storage natively within the cluster.

Rook manages full Ceph clusters offering block, object, and filesystem storage with enterprise features like erasure coding. Longhorn focuses solely on lightweight block storage replication, lacking native object storage or advanced data protection mechanisms found in Ceph deployments.

Production requires at least three nodes with dedicated raw disks for OSDs, 8GB RAM per node minimum, and NVMe SSDs recommended for metadata. Avoid sharing OSD disks with the OS or etcd to prevent performance degradation and ensure stability.

No, Rook requires raw, unformatted block devices directly attached to nodes. It formats and manages these disks exclusively for Ceph OSDs, so pre-existing partitions or formatted volumes cannot be reused without complete data loss.

Follow the official canary upgrade path: update the Rook operator first, verify health, then incrementally upgrade Ceph daemons. Always test in staging and maintain backups, as skipping major versions or upgrading during degraded states risks data corruption.

Yes, Rook v1.15 supports rbd-mirror and rgw-multisite configurations for cross-cluster replication. Configure mirror peers via CephBlockPool CRDs and ensure network connectivity between clusters for disaster recovery and geo-redundant object storage synchronization.

Set volumeBindingMode to WaitForFirstConsumer, enable compression with zstd, use replica size 3 for durability, and configure pool crush rules matching your topology. Tune pg_num based on expected OSD count to balance placement group distribution and rebalancing overhead.

Ceph detects OSD failures and begins re-replication after the default mon_osd_down_out_interval of 600 seconds. Rook monitors pod health and reschedules failed OSDs on available nodes with matching device filters, maintaining desired replica counts without manual intervention.

No, encryption must be explicitly configured via the encryptedDevice field in the CephCluster CRD. Enable dmcrypt for OSD-level encryption before initial deployment, as enabling it post-deployment requires complete cluster recreation and data migration.

Check osd_op_w_latency metrics via Prometheus, verify no OSDs are nearfull or backfilling, confirm network bandwidth between nodes exceeds 10Gbps, and validate that WAL/DB devices are on fast NVMe separate from HDD data tiers.

Yes, define both CephFilesystem and CephBlockPool resources in the same CephCluster. Share the underlying OSD pool infrastructure while maintaining separate MDS daemons for POSIX filesystem access and RBD for block volume provisioning independently.

Deploy kube-prometheus-stack with Rook’s built-in ServiceMonitor resources. Import official Ceph dashboards for Grafana, configure alerts for PG inactive, OSD down, and nearfull warnings, and scrape ceph-exporter metrics for comprehensive storage observability.

Add new raw disks to existing nodes or provision additional nodes matching device filters. Rook automatically discovers eligible devices and creates OSDs. Monitor rebalancing progress via ceph status and adjust osd_max_backfills if rebalance impacts foreground IO.

Yes, Rook implements CSI snapshotter for both RBD and CephFS. Create VolumeSnapshotClasses referencing Ceph pools, take application-consistent snapshots via kubectl, and restore or clone volumes using standard Kubernetes snapshot APIs without vendor-specific tooling.

Enable network policies restricting Ceph traffic to storage namespaces, rotate admin keys regularly, avoid exposing dashboard externally without TLS, enforce RBAC on CephCluster CRDs, and audit S3 bucket policies when using RGW to prevent unauthorized object access.