DevOps Peach

Docker & Kubernetes · Module 11

Kubernetes Storage and Configuration – Volumes, PV/PVC, ConfigMaps, Secrets

Mount volumes into pods, request durable storage through PVCs and StorageClasses, and keep configuration and secrets out of images with ConfigMaps and Secrets.

Practice interactively →

What you will learn

Lessons

  1. Volumes in a Pod — emptyDir, hostPath and others

    Volumes are declared in spec.volumes and mounted with volumeMounts; emptyDir lives with the pod, hostPath lives on one node.

  2. PersistentVolumes and PersistentVolumeClaims

    A PV is cluster storage, a PVC is an app's request for storage; pods use PVCs, never PVs directly.

  3. StorageClasses and Volume Snapshots

    StorageClasses let PVs be created automatically by storage "type"; reclaimPolicy decides the fate of the real disk; snapshots need a CSI driver.

  4. ConfigMaps and Secrets

    ConfigMaps hold configuration, Secrets hold sensitive data; both reach pods as env vars or volumes. Base64 is not encryption.