Why do we need volumes in K8s

  1. If two containers in same pod want to share data. These are ephimeral volume ( emptyDir )
  2. Persistent Volumes : All cloud providers provide u block storage. These can be externally provisioned through K8s.
  3. When pod needs extra space during execution.

Ephemeral Volumes

Persistent Volume ( PV ) and Persistent Volume Claim ( PVC )

image.png

Ephemeral Volumes

Persistent Volumes

Static Persistent Volumes

Automatic Persistent Volumes