Back to lesson: Attach the Right Volume Type
Free lab · CKA Prep Program · Module 5: Storage
PVC lifecycle
30 min hands-on · Core
Browser Kubernetes (Killercoda 1-node) or Play-with-Kubernetes; no local installs.
Two ways to do this lab: in your browser on Killercoda (free, no install), or on Play-with-Kubernetes as a free practice field. The Killercoda button opens in a new tab; this study page stays here. Killercoda runs one free scenario at a time: if you see a waiting queue, close other Killercoda tabs and wait a minute.
Objectives
- Provision storage dynamically through a StorageClass
- Bind a Pod to a PVC and prove data survives recreation
- Change reclaim behavior deliberately and observe the result
Step 1
Dynamic provisioning
List StorageClasses, create a PVC without a pre-made PV, and watch it bind. Record which provisioner did the work; that name answers exam questions.
Step 2
Data survives the pod
Mount the PVC in a Pod, write a file, delete the Pod (not the PVC), recreate it and read the file back. This is the sentence storage questions test.
Step 3
Reclaim on purpose
Create a second PV/PVC pair with `reclaimPolicy: Retain`, delete the PVC, and observe what remains. Then clean up deliberately; retained volumes are exam traps and real bills.
How to confirm it worked
- PVC bound dynamically, provisioner name recorded
- File readable after pod recreation
- Retained volume observed after PVC deletion, then cleaned up