Rook
4 min read
Cloud-Native Storage Orchestrator for Kubernetes
Rook is an open source cloud-native storage orchestrator for Kubernetes that transforms distributed storage systems into self-managing, self-scaling, and self-healing storage services. It provides the platform, framework, and support for Ceph storage to natively integrate with Kubernetes through operators and Custom Resource Definitions (CRDs).
Rook is hosted by the Cloud Native Computing Foundation (CNCF) as a graduated level project.
What It Does
Rook automates the deployment and management of storage backends (primarily Ceph) by:
• Deploying storage clusters across Kubernetes nodes
• Configuring storage pools and devices
• Provisioning volumes dynamically via StorageClasses
• Scaling storage capacity automatically
• Upgrading storage versions with minimal downtime
• Monitoring cluster health and providing alerts
Rook does this by building on Kubernetes resources — deploying, configuring, provisioning, scaling, upgrading, and monitoring the underlying storage system.
Key Features
• Operator-Based Architecture — Kubernetes operators manage the lifecycle of storage services (e.g., Ceph operator)
• Self-Healing Storage — Automatic recovery from node/p od failures
• Self-Scaling — Dynamically scale storage pools and OSDs
• Dynamic Provisioning — Integration with Kubernetes StorageClasses for on-demand volume creation
• Multi-Backend Support — Ceph (primary), and support for other storage backends
• CNCF Graduated Project — Enterprise-grade reliability and governance
• Zero-Downtime Upgrades — Support for rolling upgrades of storage clusters
Architecture
Rook uses a hierarchy of Kubernetes CRDs:
1. Cluster — Represents a storage cluster (e.g., a Ceph cluster)
2. StorageClass — Defines how storage is provisioned
3. CephObjectStore, CephBlockPool, CephFilesystem — Individual storage services within a cluster
The Rook operator runs as a Kubernetes Deployment and watches for CRD changes, reconciling the cluster state accordingly.
Supported Storage Backends
| Backend | Status |
|---|---|
| Ceph | Stable (primary backend) |
| NFS | Stable |
| Swift | Stable |
| RGW (Ceph Object Gateway) | Stable |
| Minio | Supported |
| LVM | Supported |
| IONOS Cloud Driver | Supported |
Installation
Prerequisites
• Kubernetes 1.25+
• Helm 3+ (recommended) or kubectl manifests
Helm Installation
sh
# Add the Rook Helm repository
helm repo add rook-release https://charts.rook.io/release
helm repo update
# Create Rook namespace
kubectl create namespace rook-ceph
# Install Rook operator
helm install rook-release/rook-ceph \
--namespace rook-ceph \
--create-namespace
Manifest Installation
sh
# Deploy Rook operator and cluster CR
kubectl create -f https://raw.githubusercontent.com/rook/rook/master/deploy/examples/operator.yaml
kubectl create -f https://raw.githubusercontent.com/rook/rook/master/deploy/examples/crds.yaml
kubectl create -f https://raw.githubusercontent.com/rook/rook/master/deploy/examples/cluster.yaml
Quick Start
For a complete getting started guide, see the Rook QuickStart.
Configuration
Rook clusters are configured via YAML manifests applied to Kubernetes. Key CRD fields include:
• dataDirHostPath — Host path for Ceph data (e.g., /var/lib/rook)
• storage — Node storage configuration (devices, directories, labels)
• monCount — Number of monitoring daemons
• mon — MON configuration (resources, volumeClaimTemplate)
• network — Network provider and configurations (host, multus)
• security — RBAC, keyring, and certificate settings
Example minimal cluster CR:
yaml
apiVersion: ceph.rook.io/v1
kind: CephCluster
metadata:
name: rook-ceph
namespace: rook-ceph
spec:
dataDirHostPath: /var/lib/rook
mon:
count: 3
storage:
useAllNodes: true
useAllDevices: false
deviceFilter: ""
cephVersion:
image: ceph/ceph:v18
allowUnsupported: false
dashboard:
enabled: true
ssl: true
monitoring:
enabled: true
rulesNamespace: rook-ceph
Key Commands & Usage
sh
# Check Rook operator status
kubectl get pods -n rook-ceph
# View Rook logs
kubectl logs -n rook-ceph deployment/rook-ceph-operator
# Check Ceph cluster health
kubectl -n rook-ceph exec -it deploy/rook-ceph-operator -- ceph status
# View Ceph monitors
kubectl -n rook-ceph exec -it deploy/rook-ceph-operator -- ceph mon dump
# Scale MONs
kubectl edit cephcluster rook-ceph -n rook-ceph
# Create a block pool
kubectl apply -f blockpool.yaml
# Create a filesystem
kubectl apply -f filesystem.yaml
# Create a bucket (object store)
kubectl apply -f objectstore.yaml
Administration
Monitoring
Rook integrates with Prometheus and Grafana out of the box:
• Prometheus metrics are exposed on port 9283
• Grafana dashboards are included (accessible via kubectl port-forward)
• Custom alerting rules are available
Upgrading
sh
# Upgrade Rook operator
helm upgrade rook-ceph rook-release/rook-ceph -n rook-ceph
# Upgrade Ceph cluster (rolling)
kubectl edit cephcluster rook-ceph -n rook-ceph
# Change cephVersion.image to the new Ceph version
Backup & Recovery
• Ceph snapshot-based backups using csi-snapshotter
• Manual backups via rados put/get commands