CSI (Container Storage Interface)

Excellent question! Let's break down your 5 volume categories and classify them as either:

  • Handled directly by Kubernetes (in-tree)
  • ⚠️ Deprecated / moved to CSI
  • 🔌 CSI-based (needs external driver)

✅ 1. Ephemeral Volumes

These are short-lived volumes tied to the lifecycle of a Pod.

Common Types:

Volume Type CSI? Explanation
emptyDir ❌ No In-tree, for scratch space during Pod life
configMap ❌ No In-tree, for injecting config
secret ❌ No In-tree, for injecting sensitive data
downwardAPI ❌ No In-tree, for pod metadata
ephemeral (CSI Ephemeral Volumes) ✅ Yes CSI-based, dynamic on-the-fly volumes via CSI drivers

🔸 Conclusion:
→ Most are in-tree, except ephemeral (CSI variant) which is CSI-based.


💾 2. Persistent Volumes

These survive pod restarts and require external storage (EBS, GCE, etc.)

Common Types:

Volume Type CSI? Explanation
persistentVolumeClaim ✅ Yes Claims CSI-backed PersistentVolumes
awsElasticBlockStore ⚠️ Deprecated → CSI Replaced by ebs.csi.aws.com
gcePersistentDisk ⚠️ Deprecated → CSI Replaced by pd.csi.storage.gke.io
azureDisk ⚠️ Deprecated → CSI Replaced by disk.csi.azure.com
nfs ❌ No Still in-tree (but may use CSI too if needed)
cephfs, rbd ⚠️ Deprecated → CSI Replaced by Ceph CSI drivers

🔸 Conclusion:
→ Persistent volumes mostly need CSI now.
persistentVolumeClaim is CSI entry point, not CSI itself.


🖥 3. Host-Based Volumes

These directly access the host filesystem.

Common Types:

Volume Type CSI? Explanation
hostPath ❌ No In-tree, but not safe for general use
emptyDir (memory-backed) ❌ No Also in-tree

🔸 Conclusion:
→ These are Kubernetes-native, no CSI needed.


🔗 4. fc (Fibre Channel)

Direct access to SAN storage using Fibre Channel protocol.

Volume Type CSI? Explanation
fc ❌ No Still in-tree, but requires SAN configuration manually
CSI-FC ✅ Yes You can use CSI-based FC drivers, but native fc exists

🔸 Conclusion:
→ Can be used both ways, but CSI is encouraged for automation.


📦 5. projected

Used to combine secret, configMap, downwardAPI into one volume.

Volume Type CSI? Explanation
projected ❌ No In-tree only, for mixing ephemeral config volumes

🔸 Conclusion:
→ Purely Kubernetes-native, not CSI.


🔍 Final Classification Table

Category Volume Types CSI Required?
Ephemeral emptyDir, configMap, secret, downwardAPI, ephemeral ❌ (except ephemeral = ✅)
Persistent persistentVolumeClaim, awsElasticBlockStore, gcePersistentDisk, etc. ✅ Mostly CSI now
Host-Based hostPath, emptyDir ❌ In-tree only
fc fc ❌ (native) or ✅ (optional CSI)
projected projected ❌ In-tree only

CSI drivers list