Imagine you run an app in Kubernetes that needs to save user data. What happens if the app's container restarts without persistent storage?
Think about what happens to files inside a container when it stops.
Containers have temporary storage that disappears on restart. Persistent storage keeps data safe beyond container life.
Run kubectl get pv in a cluster with two persistent volumes. What output do you expect?
kubectl get pvPersistent Volumes are cluster resources independent of pods.
The kubectl get pv command lists all persistent volumes with details like capacity and status.
Put these steps in the correct order to use persistent storage in a Kubernetes app.
Think about how storage is first made available, then requested, then used.
You first create storage (PV), then claim it (PVC), then use it in a Pod, and finally check it works.
You created a PVC and a Pod that uses it, but the Pod stays in Pending state. What is the most likely cause?
Check if the PVC can find a PV that matches its request.
If no PV matches the PVC's storage class, size, or access mode, the PVC stays unbound and Pod cannot mount it.
To protect important data stored in Kubernetes persistent volumes, which practice is best?
Think about how to keep data safe beyond Kubernetes itself.
Kubernetes does not automatically back up PV data. External backup tools ensure data safety in case of failure.