Pcornel
Browse topics
Options
Recent
Favorites
Containers · Technical reference

CSI Drivers

Direct answer

CSI (Container Storage Interface) drivers connect Kubernetes to storage systems (cloud disks, SAN, NFS, Ceph) to provision, attach and mount volumes.

When to use this

Use it when volumes fail to provision, attach or mount.

First 30 seconds

1. CSI pods running: kubectl get pods -n <csi-ns>.

2. kubectl get volumeattachment.

3. Pod events: attach/mount timeout.

4. CSI controller/node logs.

5. Storage backend health.

Operational verification

PVC → CSI controller provisions → attach → node plugin mounts

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Docker / containerd / Podman / Kubernetes / OCI-compatible platforms
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformDocker / containerd / Podman / Kubernetes / OCI-compatible platforms
Key commandkubectl get csidrivers
Scope / prerequisiteUse it when volumes fail to provision, attach or mount.
What next?2 suggested next steps
Evidence0
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

3 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 How to verify Verify boundary

Follow a failing volume through PVC events, VolumeAttachment status and node plugin logs. Confirm the node has the required kernel modules or initiator (iSCSI, NFS client).

Step 2 Checking CSI Verify boundary
kubectl get csidrivers
kubectl get storageclass
kubectl -n kube-system get pods | grep csi
kubectl describe pvc data          # provisioning events
kubectl get volumeattachments

Pods stuck in ContainerCreating with "FailedAttachVolume" or "FailedMount" point to the CSI driver, cloud permissions or a volume still attached to another node. Volume snapshots need the snapshot controller and a VolumeSnapshotClass.

Step 3 Common failures Narrow the fault

A node plugin not running on one node causes mounts to fail only there. Missing iSCSI or NFS client packages make mounts time out. Expanding a PVC requires allowVolumeExpansion on the StorageClass.

Key points

Check the CSI controller and node pods and their logs. VolumeAttachment objects show attach state. Node limits on attached volumes apply.

Key checks
  • docker ps -a — containers and exit codes
  • docker logs <c> — container output
  • docker inspect <c> — config, mounts, network, state
ReferenceWhat it is1 section · depth on demand

How it works

Sidecar containers (provisioner, attacher, resizer, snapshotter) watch Kubernetes objects and call the driver over gRPC. The node plugin formats and mounts the device into the kubelet's Pod directory. VolumeAttachment objects record attachments.

ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

A CSI driver has two halves and several Kubernetes sidecars that translate API objects into gRPC calls:

ComponentRuns asHandles
Controller plugin + external-provisionerDeploymentCreateVolume / DeleteVolume for PVCs
external-attacherDeploymentControllerPublish (attach a disk to a node) via VolumeAttachment
external-resizer, external-snapshotterDeploymentExpansion and VolumeSnapshots
Node plugin + node-driver-registrarDaemonSetNodeStage (format, mount once per node) and NodePublish (bind into the Pod)

Following one volume through the stages

kubectl describe pvc data                 # Provisioning succeeded?  → controller side OK
kubectl get volumeattachment | grep <pv>  # ATTACHED true?           → attacher OK
kubectl describe pod app-0 | tail         # MountVolume.SetUp failed? → node plugin
kubectl -n kube-system logs <node-plugin-pod-on-that-node> -c <driver>

Errors appear at the first stage that fails, so read events in this order instead of starting with the Pod.

Common node-side causes

Message fragmentCause
driver name … not found in the list of registered CSI driversNode plugin not running on that node (taint, nodeSelector)
timed out waiting for the condition on mountMissing iSCSI initiator or NFS client, firewall to storage
Multi-Attach errorRWO volume still attached to the previous node

Volume expansion requires allowVolumeExpansion: true on the StorageClass; filesystem resize on the node happens at the next mount or online if the driver supports it.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Common mistakes

  • CSI driver version not matching the Kubernetes version.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
csi driverscsi driver kubernetesvolumeattachment
Confirmation

Confirm action

Continue?