Skip to main content
RunBook Academy

CephLXXXV · Kubernetes IntegrationKubernetes Integration

The CSI architecture for Ceph

Intermediate⏱ ~18 minkubectlceph

What you'll learn

  • Describe the Ceph-CSI component architecture
  • Identify what each component does
  • Map failures to their effects
  • Locate the right component when diagnosing

Prerequisites

None — start here.

Verified against Ceph Tentacle 20.2.x · Ceph Squid 19.2.x (supported previous) · cephadm matches the verified Ceph release · podman 4.x · csi-rbd and csi-cephfs current · RBD / CephFS / RGW current (matches Ceph release) · Linux kernel 5.15+ (5.10 minimum) · Ubuntu 24.04 LTS (Ceph host baseline) · Debian 12 (Bookworm) (Ceph host baseline) · Rocky Linux / RHEL / AlmaLinux 9.x (Ceph host baseline) · Proxmox VE 9.x (cross-course integration) · Kubernetes 1.31+ (cross-course integration) · 2026-08-18

Not yet marked complete on this device.

Why this matters in production

Ceph-CSI is several components with different responsibilities, and a storage problem in Kubernetes is usually located in exactly one of them.

The components

flowchart TD
  A[PVC created] --> B[csi-provisioner sidecar]
  B --> C[CSI controller plugin]
  C --> D[Ceph: create RBD image]
  E[Pod scheduled] --> F[csi-node plugin on that node]
  F --> G[Map RBD image, mount filesystem]
  G --> H[Pod starts]
ComponentRuns asResponsibility
csi-rbdplugin-provisionerDeployment, few replicascreate, delete, expand, snapshot
csi-rbdpluginDaemonSet, every nodemap, mount, unmount, unmap
csi-provisioner sidecarin the provisioner podwatches PVCs
csi-attacher sidecarin the provisioner podVolumeAttachment handling
csi-resizer sidecarin the provisioner podexpansion
csi-snapshotter sidecarin the provisioner podVolumeSnapshot handling
node-driver-registrarin the node podregisters the driver with kubelet
kubectl -n ceph-csi get pods
kubectl -n ceph-csi get daemonset,deployment

What each failure affects

Failed componentEffect
Provisioner deploymentnew PVCs stay Pending; existing volumes keep working
Node plugin on one nodepods on that node cannot mount; other nodes fine
Node plugin everywhereno pod can mount a Ceph volume anywhere
node-driver-registrarkubelet does not know the driver exists on that node
Ceph unreachableeverything, but running pods with mounted volumes continue

The split matters: a provisioner outage is invisible to running workloads and blocks all new ones, which is a very different urgency from a node plugin outage.

Locating a problem

# a PVC stuck Pending → provisioner
NAME=acme
NODE=stor-04
kubectl describe pvc ${NAME}
kubectl -n ceph-csi logs deploy/csi-rbdplugin-provisioner -c csi-rbdplugin

# a pod stuck ContainerCreating → node plugin on that node
kubectl describe pod ${NAME}
kubectl -n ceph-csi logs -l app=csi-rbdplugin --field-selector spec.nodeName=${NODE}

# everything failing → Ceph itself
ceph -s

The Kubernetes event on the object names the phase, and the phase names the component.

kubectl get events --sort-by=.lastTimestamp | grep -i -E 'volume|mount|attach'

Configuration

apiVersion: v1
kind: ConfigMap
metadata:
  name: ceph-csi-config
  namespace: ceph-csi
data:
  config.json: |
    [{
      "clusterID": "b3d5f2a1-...",
      "monitors": ["10.0.2.11:3300","10.0.2.12:3300","10.0.2.13:3300"]
    }]

The clusterID is the Ceph cluster’s fsid and links the StorageClass to this configuration entry.

ceph fsid
kubectl -n ceph-csi get cm ceph-csi-config -o jsonpath='{.data.config\.json}'

Quiz

Knowledge check · 4 questions

  1. Q1. A PVC is stuck in Pending. Which component should you investigate?

  2. Q2. A provisioner outage is invisible to running workloads while blocking every new one.

  3. Q3. Diagnose a Ceph storage problem in Kubernetes.

    Pods on one node are stuck in ContainerCreating with mount errors. Pods on other nodes start normally. New PVCs are provisioning successfully.

  4. Q4. Why must the node plugin run on every node while the provisioner does not?

Passing score: 75%. Answers are checked in this browser.

Production discipline

Read the failing phase from the Kubernetes event before opening any logs — Pending means the provisioner Deployment and ContainerCreating with a mount error means the node plugin on that specific node. The two have separate logs and separate failure domains.

Cross-course references

  • Kubernetes: the controller/node split appears in every CSI driver
  • Linux: cluster-level provisioning versus node-local attachment is a general pattern