Learn to attach storage to Pods, bind PVs and PVCs, use StorageClasses for dynamic provisioning, and fix Pending claims with CKA-style labs and drills.
Picture a Friday evening deploy. A small team ships a new image for their order-tracking database running as a Pod.
Storage that outlives Pods needs an object that outlives Pods.
Creating PVs by hand does not scale. A StorageClass describes a type of storage and the provisioner that can create it, so a PVC can say "give me...
Three settings decide how a volume can be used and what happens to it later. Getting them wrong rarely shows up at creation time.
Binding a PVC proves nothing until a Pod writes to it and survives a restart.
Storage failures come in two shapes: the claim never binds, or the Pod never starts.
Picture a Friday evening deploy. A small team ships a new image for their order-tracking database running as a Pod.
Storage that outlives Pods needs an object that outlives Pods.
Creating PVs by hand does not scale. A StorageClass describes a type of storage and the provisioner that can create it...
Three settings decide how a volume can be used and what happens to it later.
Binding a PVC proves nothing until a Pod writes to it and survives a restart.
Storage failures come in two shapes: the claim never binds, or the Pod never starts.
Seven short labs on your own cluster. Each states a goal, then solution steps.
Exam tasks are short, and the clock is the real opponent.
Keep this table and the mistakes below as your last read before the exam.
Roles that use the skills in this module.
DevOps Engineer
Site Reliability Engineer
Platform Engineer
Not a software engineer sheet. Every problem comes from real DevOps, SRE, Platform and Cloud interviews, from your first script to a system you build yourself.
Open the Coding SheetA PersistentVolume (PV) is a piece of storage in the cluster, created by an admin or by a provisioner. A PersistentVolumeClaim (PVC) is a request for storage made by a user inside a namespace. Kubernetes binds each PVC to one PV that satisfies its size, access mode and StorageClass, and Pods then mount the PVC, never the PV directly.
The most common causes are a StorageClass name that does not exist, no PV that matches the requested size or access mode, or no provisioner behind the class. A PVC can also be Pending on purpose when its StorageClass uses WaitForFirstConsumer, which waits until a Pod uses the claim. Run kubectl describe pvc and read the Events section to see which case you are in.
It depends on the reclaim policy of the PV that was bound. With Retain, the PV moves to Released and the data stays until an admin cleans up. With Delete, the PV and usually the backing storage are removed with the claim. Dynamically provisioned volumes default to Delete, so check the policy before deleting anything you care about.
No. A hostPath volume ties data to one node's filesystem, so a Pod rescheduled to another node sees different data. It also exposes the node's files to the Pod, which is a security risk. Use it for single-node labs and tests, and use a real storage backend through a StorageClass for anything that matters.
Yes, if both Pods run on the same node, because ReadWriteOnce limits mounting to a single node and not to a single Pod. Pods on different nodes cannot mount it at the same time. If you need exactly one Pod to have access, use ReadWriteOncePod instead.