Configs2026年4月15日·1 分钟阅读

Rook — Cloud-Native Storage Orchestrator for Kubernetes

Rook turns Ceph into a first-class Kubernetes citizen by deploying, configuring, and healing distributed block, file, and object storage through an operator and a family of CRDs.

Introduction

Running Ceph in production used to require deep distributed-systems expertise. Rook changes that by wrapping Ceph (and historically Cassandra, NFS, YugabyteDB) in a Kubernetes operator: you declare the desired cluster in YAML, and Rook handles OSD provisioning, monitor quorum, RGW gateways, CephFS metadata servers, CSI drivers, and rolling upgrades.

What Rook Does

  • Deploys and manages a full Ceph cluster (MON, MGR, OSD, MDS, RGW) from a CephCluster CR.
  • Provisions PersistentVolumes via RBD (block), CephFS (shared file), and S3-compatible object storage.
  • Auto-heals failed OSDs, replaces disks, and rebalances placement groups without manual intervention.
  • Exposes Ceph''s mirroring, erasure coding, compression, and encryption through declarative CRDs.
  • Integrates with Prometheus ServiceMonitors for deep cluster-health visibility.

Architecture Overview

Rook is a controller-runtime operator. The Rook Operator Pod watches CRs (CephCluster, CephBlockPool, CephObjectStore, CephFilesystem) and invokes the rook and ceph CLIs inside helper Pods to configure the cluster. OSDs run as one Pod per disk, co-located on the nodes that host the raw devices. CSI drivers (RBD, CephFS) mount volumes into workload Pods directly — no gateway hops.

Self-Hosting & Configuration

  • Minimum recommended footprint: 3 nodes, each with one empty raw device and 4 GiB free RAM.
  • Use useAllDevices: true in CephCluster for zero-touch disk discovery, or list devices explicitly.
  • Enable the dashboard with dashboard.enabled: true and expose via an Ingress for an operations UI.
  • Tune replication/erasure with CephBlockPool — replicated size=3 for durability, 2+1 EC for efficiency.
  • Upgrades: bump cephVersion.image and the operator Deployment; Rook rolls MONs and OSDs safely.

Key Features

  • Official Ceph operator — Ceph upstream recommends Rook as the Kubernetes installation method.
  • Full lifecycle: install, scale, upgrade, disaster recovery (RBD mirroring, multisite RGW), deletion.
  • Supports NVMe, HDD, SSD, and hybrid device classes; per-class CRUSH rules for tiered storage.
  • Works on cloud (EBS, PD, Azure Disk) or on-prem bare-metal; no vendor lock-in.
  • S3 multi-site, CephFS subvolumes, NFS exports, and iSCSI gateways all exposed via CRDs.

Comparison with Similar Tools

  • OpenEBS — multi-engine (Jiva, cStor, Mayastor, Local PV); Rook is Ceph-specific and cluster-scale heavy.
  • Longhorn — simpler, single-engine block storage from Rancher; Rook wins for object and shared file.
  • Portworx — commercial, feature-rich; Rook is free, open-source, and avoids vendor lock-in.
  • Piraeus / LINSTOR — DRBD-based replication; Rook is better when you need object + file + block together.
  • StorageOS / Ondat — closed-source stacks; Rook + Ceph gives you full auditability.

FAQ

Q: Can I test without real disks? A: Yes — use directory-based OSDs on PVCs for lab clusters; performance is limited but great for learning.

Q: Is the non-Ceph code still maintained? A: No. Rook is now Ceph-only; Cassandra and NFS drivers were removed in favor of focus.

Q: How do I monitor cluster health? A: Enable the Prometheus exporter in CephCluster; Grafana dashboards for Ceph are shipped in the repo.

Q: Can I run it on a single node? A: For experiments, yes (set mon.count: 1 and allowMultiplePerNode: true); production needs ≥3 nodes.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产