CSI Architecture and Components
What you'll learn: How the Container Storage Interface (CSI) driver's internal pieces—Controller Plugin and Node Plugin—work with Kubernetes to provide storage.
The Two-Part Architecture
CSI drivers split storage responsibilities into two specialized components that run as separate processes:
Controller Plugin acts like a central manager. It runs as a Deployment (often just one or a few replicas) and handles cluster-wide operations like:
- Creating volumes when a PVC requests storage
- Deleting volumes when they're no longer needed
- Taking snapshots
- Expanding volume capacity
Node Plugin runs as a DaemonSet—one pod per node. It handles local, node-specific tasks like:
- Mounting volumes to the node's filesystem
- Unmounting volumes when Pods are deleted
- Making volumes available to containers
How They Work Together
Think of the Controller Plugin as a warehouse manager who orders and tracks inventory, while the Node Plugin is like a delivery driver who brings packages to specific addresses and unpacks them.
When you create a PVC:
- Kubernetes talks to the Controller Plugin via CSI gRPC calls
- The Controller Plugin provisions storage from the backend (AWS EBS, Azure Disk, etc.)
- When a Pod needs that volume, the Node Plugin on that specific node mounts it
- The volume becomes accessible to your container
Both plugins communicate with Kubernetes through the CSI specification—a standard interface that ensures any CSI driver works the same way, regardless of the underlying storage system.
Key Takeaway: CSI drivers use a Controller Plugin for cluster-wide provisioning operations and a Node Plugin (one per node) for local mounting tasks, working together to deliver storage to your Pods through a standardized interface.