Kubernetes needs persistent storage. Cloud providers offer EBS and PersistentDisks. On-premises and bare metal clusters need something else. Rook deploys Ceph — a production-grade distributed storage system — as a Kubernetes operator.
What Rook-Ceph Provides
| Storage Type | Use Case | Kubernetes Object |
|---|---|---|
| Block (RBD) | Databases, single-pod volumes | PersistentVolumeClaim |
| Filesystem (CephFS) | Shared storage, ReadWriteMany | PersistentVolumeClaim |
| Object (RGW) | S3-compatible storage | ObjectBucketClaim |
Installation
# Deploy the Rook operator
helm install rook-ceph rook-release/rook-ceph \
--namespace rook-ceph --create-namespace
# Create a Ceph cluster
kubectl apply -f - <<EOF
apiVersion: ceph.rook.io/v1
kind: CephCluster
metadata:
name: rook-ceph
namespace: rook-ceph
spec:
cephVersion:
image: quay.io/ceph/ceph:v18.2
dataDirHostPath: /var/lib/rook
mon:
count: 3
storage:
useAllNodes: true
useAllDevices: true
EOFRook discovers available disks on each node and creates a Ceph cluster automatically.
Master this topic with hands-on labs
Go beyond reading — build real projects in sandboxed environments with expert video guidance.
Browse Courses →Block Storage (RBD)
For databases and single-pod workloads:
apiVersion: ceph.rook.io/v1
kind: CephBlockPool
metadata:
name: replicapool
namespace: rook-ceph
spec:
replicated:
size: 3 # 3 copies across nodes
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: rook-ceph-block
provisioner: rook-ceph.rbd.csi.ceph.com
parameters:
clusterID: rook-ceph
pool: replicapool
csi.storage.k8s.io/fstype: ext4
reclaimPolicy: Delete
allowVolumeExpansion: true# Use in a deployment
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: postgres-data
spec:
storageClassName: rook-ceph-block
accessModes: [ReadWriteOnce]
resources:
requests:
storage: 50GiShared Filesystem (CephFS)
For shared storage across multiple pods:
apiVersion: ceph.rook.io/v1
kind: CephFilesystem
metadata:
name: shared-fs
namespace: rook-ceph
spec:
metadataPool:
replicated:
size: 3
dataPools:
- replicated:
size: 3
metadataServer:
activeCount: 1
activeStandby: true
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: rook-cephfs
provisioner: rook-ceph.cephfs.csi.ceph.com
parameters:
clusterID: rook-ceph
fsName: shared-fs# ReadWriteMany PVC — shared across pods
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: shared-uploads
spec:
storageClassName: rook-cephfs
accessModes: [ReadWriteMany]
resources:
requests:
storage: 100GiMultiple pods can read and write to the same volume simultaneously.
Get weekly IT automation tips
Docker, Ansible, Terraform, MLOps — curated insights delivered to your inbox. No spam.
Subscribe Free →Object Storage (S3)
apiVersion: ceph.rook.io/v1
kind: CephObjectStore
metadata:
name: s3-store
namespace: rook-ceph
spec:
metadataPool:
replicated:
size: 3
dataPool:
replicated:
size: 3
gateway:
port: 80
instances: 2# Request a bucket
apiVersion: objectbucket.io/v1alpha1
kind: ObjectBucketClaim
metadata:
name: app-bucket
spec:
generateBucketName: app-data
storageClassName: rook-ceph-bucketAccess via S3 API using credentials from the generated secret.
Monitoring
# Check cluster health
kubectl -n rook-ceph exec deploy/rook-ceph-tools -- ceph status
# Output:
cluster:
health: HEALTH_OK
services:
mon: 3 daemons
osd: 6 osds: 6 up, 6 in
data:
pools: 3 pools, 96 pgs
objects: 1.2k objects, 4.5 GiB
usage: 15 GiB used, 585 GiB availWhen to Use Rook-Ceph
Good fit: - On-premises Kubernetes clusters needing persistent storage - Bare metal clusters without cloud storage - Workloads needing ReadWriteMany (shared) volumes - Teams wanting S3-compatible storage alongside block storage
Not needed: - Cloud clusters (use EBS, PersistentDisks) - Small clusters (<3 nodes — Ceph needs 3+ for replication) - Workloads that only need ephemeral storage
Rook-Ceph is production-grade but operationally complex. Plan for monitoring, capacity management, and occasional maintenance.
---
Ready to go deeper? Master Kubernetes storage with hands-on courses at CopyPasteLearn.
Ready to learn by doing?
Stop reading tutorials — start building. Expert video courses with hands-on labs in real sandboxed environments.
Related Articles
Velero Kubernetes Backup Guide
Velero backs up and restores Kubernetes resources and persistent volumes. Learn how to set up Velero, schedule backups, and recover from cluster disasters.
Longhorn Cloud Native Storage Guide
Longhorn is a lightweight distributed storage system for Kubernetes. Learn how Longhorn provides replicated block storage, snapshots, and backups.
Minio S3 Compatible Object Storage
MinIO provides S3-compatible object storage you can self-host anywhere. Learn how to deploy MinIO on Kubernetes for backups, artifacts, ML datasets.
Root Cause Analysis for DevOps
Apply Root Cause Analysis to DevOps incidents. The 5 Whys, fishbone diagrams, blameless postmortems, and automated RCA tooling.
Sealed Secrets Kubernetes Guide
Sealed Secrets encrypts Kubernetes secrets so you can store them safely in Git. Learn how to install Sealed Secrets, encrypt secrets, and manage key rotation.
Securing Your OpenClaw Agent
Security guide for self-hosted OpenClaw agents — API key management, network hardening, permission boundaries, and data protection.
Explore topics
Browse more articles on the topics covered here.