Skip to main content

Kubernetes Volumes

Introduction to Volumes

0:00
LearnStep 1/2

Kubernetes Volumes

Introduction to Volumes

Kubernetes volumes solve the problem of data persistence. By default, container data is ephemeral - it's lost when the container stops.

Volume Types

  • emptyDir: Temporary storage, deleted with Pod
  • hostPath: Mount from host node's filesystem
  • configMap/secret: Mount configuration data
  • persistentVolumeClaim: Request persistent storage
  • nfs: Network File System mount
  • cloud volumes: AWS EBS, GCP PD, Azure Disk

emptyDir Volume

yaml

hostPath Volume

yaml