Bird
0
0

Consider this PersistentVolumeClaim YAML:

medium📝 Predict Output Q4 of 15
Kubernetes - Persistent Storage
Consider this PersistentVolumeClaim YAML:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: example-pvc
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi

What will Kubernetes do if no PersistentVolume matches this claim?
AThe pod using this PVC will start without mounting any volume
BKubernetes will automatically create a new PersistentVolume
CThe PVC will remain in Pending state until a matching PV is available
DThe PVC will be deleted automatically after a timeout
Step-by-Step Solution
Solution:
  1. Step 1: PVC binding process

    A PersistentVolumeClaim waits for a PersistentVolume that satisfies its requirements.
  2. Step 2: Behavior when no PV matches

    If no suitable PersistentVolume exists, the PVC stays in Pending state until one becomes available.
  3. Final Answer:

    The PVC will remain in Pending state until a matching PV is available -> Option C
  4. Quick Check:

    PVC waits for matching PV, does not auto-create or delete [OK]
Quick Trick: PVC stays Pending if no matching PV exists [OK]
Common Mistakes:
  • Thinking Kubernetes auto-creates PVs for PVCs
  • Assuming pods start without volumes if PVC is unbound
  • Believing PVCs get deleted automatically when unbound

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes