Bird
0
0

How can you combine Volumes and Persistent Volumes to enable data sharing between multiple Pods?

hard📝 Application Q9 of 15
Kubernetes - Persistent Storage
How can you combine Volumes and Persistent Volumes to enable data sharing between multiple Pods?
AUse ConfigMaps to share data between Pods.
BCreate a Persistent Volume, bind it with a Persistent Volume Claim, and mount the PVC in multiple Pods.
CUse emptyDir volumes in each Pod and copy data manually between them.
DMount container filesystem volumes in all Pods.
Step-by-Step Solution
Solution:
  1. Step 1: Understand shared storage setup

    Persistent Volumes bound to PVCs can be mounted by multiple Pods for shared data.
  2. Step 2: Exclude ephemeral and config options

    emptyDir is Pod-local, ConfigMaps are for config, container filesystem is isolated.
  3. Final Answer:

    Create a Persistent Volume, bind it with a Persistent Volume Claim, and mount the PVC in multiple Pods. -> Option B
  4. Quick Check:

    PV + PVC + multiple mounts = shared data [OK]
Quick Trick: Use PVC mounted in multiple Pods for shared persistent storage [OK]
Common Mistakes:
  • Using emptyDir expecting sharing
  • Confusing ConfigMap with data sharing
  • Trying to share container filesystem volumes

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes