CephLXXXV · Kubernetes IntegrationKubernetes Integration
The CSI architecture for Ceph
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
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]
| Component | Runs as | Responsibility |
|---|---|---|
csi-rbdplugin-provisioner | Deployment, few replicas | create, delete, expand, snapshot |
csi-rbdplugin | DaemonSet, every node | map, mount, unmount, unmap |
csi-provisioner sidecar | in the provisioner pod | watches PVCs |
csi-attacher sidecar | in the provisioner pod | VolumeAttachment handling |
csi-resizer sidecar | in the provisioner pod | expansion |
csi-snapshotter sidecar | in the provisioner pod | VolumeSnapshot handling |
node-driver-registrar | in the node pod | registers the driver with kubelet |
kubectl -n ceph-csi get pods
kubectl -n ceph-csi get daemonset,deployment
What each failure affects
| Failed component | Effect |
|---|---|
| Provisioner deployment | new PVCs stay Pending; existing volumes keep working |
| Node plugin on one node | pods on that node cannot mount; other nodes fine |
| Node plugin everywhere | no pod can mount a Ceph volume anywhere |
node-driver-registrar | kubelet does not know the driver exists on that node |
| Ceph unreachable | everything, 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
Q1. A PVC is stuck in Pending. Which component should you investigate?
Q2. A provisioner outage is invisible to running workloads while blocking every new one.
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.
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