惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Visual Studio Blog
Recent Announcements
Recent Announcements
有赞技术团队
有赞技术团队
The GitHub Blog
The GitHub Blog
N
Netflix TechBlog - Medium
腾讯CDC
A
About on SuperTechFans
博客园 - 叶小钗
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
D
DataBreaches.Net
D
Docker
宝玉的分享
宝玉的分享
量子位
Microsoft Azure Blog
Microsoft Azure Blog
Martin Fowler
Martin Fowler
博客园 - 三生石上(FineUI控件)
Jina AI
Jina AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
V2EX
Last Week in AI
Last Week in AI
H
Help Net Security
Hugging Face - Blog
Hugging Face - Blog
M
MIT News - Artificial intelligence

OneUptime Blog

How to Monitor Azure App Services (PaaS) with OpenTelemetry Grafana Stack vs OneUptime: DIY Observability or Unified Platform? Your AI Workloads Are About to Blow Up Your Observability Bill The Great Observability Consolidation Is Here How to Write Custom Object Classes for Ceph How to Write Custom Ceph Manager Modules How to Write a ceph.conf Configuration File How to Use Rook-Ceph with Longhorn for Comparison How to Configure Volume Snapshot Class for RBD in Rook How to Configure VolumeReplicationClass Scheduling Intervals in Rook How to Set Up Volume Replication with Rook-Ceph How to Create Volume Group Snapshots with Rook CSI How to Visualize Ceph Network Performance in Grafana How to Enable Virtual Host-Style Bucket Access in Rook How to View Runtime Configuration via Admin Socket How to View Quota Settings and Update Stats in Ceph RGW How to View PG Scaling Recommendations with autoscale-status How to View PG Distribution via Admin Socket How to View Performance Metrics in the Ceph Dashboard How to View OSD Performance Counters in Ceph How to View Connection Status via Admin Socket How to View Ceph Cluster Summary Dashboard via CLI How to Version Control Rook-Ceph Configuration How to Version Control Ceph Infrastructure with Terraform How to Verify Kubernetes Node Requirements for Rook-Ceph Deployment How to Verify Health Before and After Rook Upgrades How to Verify Data Integrity with Deep Scrubbing How to Verify Complete Rook-Ceph Cleanup How to Verify Backup Integrity from Ceph Snapshots How to Use Rook-Ceph with Velero for Kubernetes Backup
How to Use Rook-Ceph with OpenShift
Nawaz Dhandala · 2026-03-31 · via OneUptime Blog

How Rook-Ceph Works on OpenShift

OpenShift enforces stricter security policies than vanilla Kubernetes through Security Context Constraints (SCCs). Running Rook-Ceph on OpenShift requires specific SCCs for the Rook operator, CSI drivers, and Ceph daemon pods. OpenShift also provides the OpenShift Data Foundation (ODF) operator as the official packaging of Rook-Ceph, which handles most of these security requirements automatically.

flowchart TD
    subgraph OCP["OpenShift Cluster"]
        OLM["Operator Lifecycle Manager"] --> ODF["ODF Operator\n(Rook-Ceph)"]
        SCC["Security Context Constraints"] --> RookPods["Rook + Ceph Pods"]
        ODF --> RookPods
        ODF --> CSI["CSI Drivers"]
    end

Option 1 - Install via OperatorHub (Recommended)

The easiest way to run Rook-Ceph on OpenShift is through the OpenShift Data Foundation operator from OperatorHub.

Navigate to OperatorHub in the OpenShift console, search for "OpenShift Data Foundation", and install it into the openshift-storage namespace.

Or install via CLI:

cat <<EOF | oc apply -f -
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: odf-operator
  namespace: openshift-storage
spec:
  channel: stable-4.16
  name: odf-operator
  source: redhat-operators
  sourceNamespace: openshift-marketplace
EOF

Option 2 - Manual Rook Installation with OpenShift SCCs

If you want to install upstream Rook directly on OpenShift, you must configure SCCs first.

Create the privileged SCC for Rook operator:

oc adm policy add-scc-to-user privileged \
  system:serviceaccount:rook-ceph:rook-ceph-operator

Add privileged SCC for the Rook-Ceph default service account:

oc adm policy add-scc-to-user privileged \
  system:serviceaccount:rook-ceph:default

Add anyuid SCC for Ceph daemon service accounts:

oc adm policy add-scc-to-user anyuid \
  system:serviceaccount:rook-ceph:rook-ceph-osd
oc adm policy add-scc-to-user anyuid \
  system:serviceaccount:rook-ceph:rook-ceph-mgr

For CSI drivers, add privileged SCC:

oc adm policy add-scc-to-user privileged \
  system:serviceaccount:rook-ceph:rook-csi-rbd-plugin-sa
oc adm policy add-scc-to-user privileged \
  system:serviceaccount:rook-ceph:rook-csi-cephfs-plugin-sa

Deploying Rook-Ceph on OpenShift

After setting up SCCs, create the namespace and deploy Rook:

oc create namespace rook-ceph

Apply CRDs, common resources, and the operator:

oc apply --server-side -f crds.yaml
oc apply -f common.yaml
oc apply -f operator-openshift.yaml

Rook provides an OpenShift-specific operator file (operator-openshift.yaml) that adjusts settings for OCP compatibility. Download it from the Rook releases page.

OpenShift-Specific CephCluster Configuration

When deploying CephCluster on OpenShift, set the useAllDevices setting carefully since OpenShift nodes may have additional devices used by the OS:

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
  storage:
    useAllNodes: false
    useAllDevices: false
    nodes:
      - name: worker-0
        devices:
          - name: sdb
      - name: worker-1
        devices:
          - name: sdb
      - name: worker-2
        devices:
          - name: sdb
  placement:
    all:
      tolerations:
        - key: node-role.kubernetes.io/control-plane
          operator: Exists
  resources:
    osd:
      requests:
        cpu: "500m"
        memory: "2Gi"

Configuring OpenShift Routes for RGW

To expose the Ceph object store (RGW) on OpenShift, create a Route:

apiVersion: route.openshift.io/v1
kind: Route
metadata:
  name: rook-ceph-rgw
  namespace: rook-ceph
spec:
  to:
    kind: Service
    name: rook-ceph-rgw-my-store
  port:
    targetPort: http
  tls:
    termination: edge
    insecureEdgeTerminationPolicy: Redirect

Apply it:

oc apply -f rgw-route.yaml

Get the RGW external URL:

oc get route rook-ceph-rgw -n rook-ceph

Using Rook-Ceph Storage in OpenShift Applications

Create a PVC using Rook-Ceph's StorageClass:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: my-app-data
  namespace: my-app
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: rook-ceph-block
  resources:
    requests:
      storage: 10Gi

For an OpenShift Deployment:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-app
spec:
  replicas: 1
  selector:
    matchLabels:
      app: my-app
  template:
    metadata:
      labels:
        app: my-app
    spec:
      containers:
        - name: app
          image: nginx
          volumeMounts:
            - mountPath: /data
              name: app-storage
      volumes:
        - name: app-storage
          persistentVolumeClaim:
            claimName: my-app-data

Monitoring Rook-Ceph with OpenShift Monitoring

Rook-Ceph exposes Prometheus metrics from the Ceph manager daemon by default. To scrape these metrics with the OpenShift monitoring stack, create a ServiceMonitor:

apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: rook-ceph-mgr
  namespace: rook-ceph
  labels:
    team: rook
spec:
  namespaceSelector:
    matchNames:
      - rook-ceph
  selector:
    matchLabels:
      app: rook-ceph-mgr
  endpoints:
    - port: http-metrics
      path: /metrics
      interval: 15s

Summary

Running Rook-Ceph on OpenShift requires configuring Security Context Constraints for the Rook operator, daemon, and CSI driver service accounts. The recommended approach for production is to use the OpenShift Data Foundation operator through OperatorHub, which handles SCC configuration automatically. For upstream Rook installations, use the OpenShift-specific operator manifest and manually assign privileged and anyuid SCCs. Expose RGW externally using OpenShift Routes, and integrate with OpenShift's monitoring stack using ServiceMonitor resources.