Back to blogs

Kubernetes Volume

Himanshu Rai·1 min read
Published 6/20/2026

A Volume is mounted inside a Pod and survives container restarts.

Container ↓ /app/data → Volume

Volumes are defined at the Pod level, not container level.


Common Ways to Use Filesystem in Kubernetes

  1. emptyDir (Temporary Shared Storage) What it is: Temporary storage Created when Pod starts Deleted when Pod is removed

Use case: Sharing files between containers Caching Scratch space

  1. hostPath (Node Filesystem Access) Mounts a directory from the node’s filesystem.

Problems: Tied to one node Not portable Security risks

Use mostly for: Development DaemonSets Log collectors

  1. PersistentVolume (PV) + PersistentVolumeClaim (PVC)

Pod → PVC → PV → Storage Backend

Step 1: Create PVC Step 2: Mount in Pod


Access Modes

ModeMeaning
ReadWriteOnceMounted by one node
ReadOnlyManyMany nodes, read only
ReadWriteManyMany nodes, read/write