KubeDojo

Ephemeral Volumes: emptyDir, configMap, projected

AK
by Alexis Kinsella··14 min read
Ephemeral Volumes: emptyDir, configMap, projected

You request a PersistentVolumeClaim for a scratch directory that gets wiped on every deploy. You mount a hostPath to read a config file that already lives in a ConfigMap. Both work. Both add operational complexity for data that does not outlive the Pod.

Kubernetes groups these use cases under ephemeral volumes: volumes that are created with the Pod and deleted when the Pod disappears. The CKAD exam tests this under the Application Design and Build domain (20%), with the competency "Utilize persistent and ephemeral volumes." You need to know four volume types cold: emptyDir, configMap/secret, downwardAPI, and projected.

Sign in to access this lesson

Create a free account or sign in to enroll in the CKAD — Certified Kubernetes Application Developer course and access all 44 lessons.

CKAD — Certified Kubernetes Application Developer

44 lessons

Browse the full course curriculum →