Rook: Turn Your Disks Into Cloud Storage on Kubernetes
Rook turns distributed storage systems into self-managing Kubernetes services. Ceph, NFS, Cassandra — managed by Kubernetes operators. No storage admin needed.
Why Rook
- Self-healing storage on Kubernetes
- Ceph integration (block, file, object storage)
- No external storage infrastructure needed
- Automatic rebalancing and recovery
- Production-proven at scale
The Free API (CRDs)
# Create a Ceph cluster
apiVersion: ceph.rook.io/v1
kind: CephCluster
metadata:
name: rook-ceph
namespace: rook-ceph
spec:
cephVersion:
image: quay.io/ceph/ceph:v18
dataDirHostPath: /var/lib/rook
mon:
count: 3
dashboard:
enabled: true
storage:
useAllNodes: true
useAllDevices: true
---
# Block storage (like EBS)
apiVersion: ceph.rook.io/v1
kind: CephBlockPool
metadata:
name: replicapool
namespace: rook-ceph
spec:
replicated:
size: 3
---
# StorageClass for PVCs
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
# Check cluster health
kubectl -n rook-ceph get cephcluster
# Ceph status
kubectl -n rook-ceph exec deploy/rook-ceph-tools -- ceph status
# OSD status
kubectl -n rook-ceph exec deploy/rook-ceph-tools -- ceph osd tree
Storage Types
| Type | CRD | Use Case |
|---|---|---|
| Block (RBD) | CephBlockPool | Databases, stateful apps |
| Filesystem (CephFS) | CephFilesystem | Shared file access |
| Object (S3) | CephObjectStore | S3-compatible storage |
Real-World Use Case
A company ran stateful databases on Kubernetes but depended on expensive SAN storage. Rook-Ceph on local NVMe drives: 3x better IOPS, self-healing replication, S3-compatible object store for backups. Storage cost dropped 70%.
Quick Start
kubectl apply -f https://raw.githubusercontent.com/rook/rook/release-1.14/deploy/examples/crds.yaml
kubectl apply -f https://raw.githubusercontent.com/rook/rook/release-1.14/deploy/examples/operator.yaml
kubectl apply -f https://raw.githubusercontent.com/rook/rook/release-1.14/deploy/examples/cluster.yaml
Resources
Need storage monitoring data? Check out my tools on Apify or email spinov001@gmail.com for custom solutions.
Top comments (0)