← Main page

Kubernetes volume types

EmptyDir

Not persistent (when pod is restarted its data is lost), starts empty and allows to share folder between containers of the same pod (when explicitly mounted).

GitRepo

Not persistent, starts with data from a public Git repo and allows to share folder between containers of the same pod

Secret

In-memory directory to pass credentials to pods.

HostPath

Persistent on a node, usually is used with DaemonSet.

PersistentVolume

Persistent, created by admin with a given technology (like GCEPersistentDisk), capacity and access modes.

PersistentVolumeClaim

Abstracts away from a given technology by pointing to PersistentVolume.