How do you share a volume between multiple pods across nodes?
IntermediateScenarioConfiguration, Secrets and storage
Answer
Situation read → Several web pods need the same uploads directory.
What I'd do →
- Use a ReadWriteMany capable backend such as EFS, NFS or CephFS
- On EKS install the EFS CSI driver and create a StorageClass with
provisioningMode: efs-ap - Create a PVC with
accessModes: ReadWriteMany - Better, move uploads to S3 object storage
- Test concurrent writes and locking behaviour
Why → EBS is RWO only, so cross-node sharing needs a network filesystem or object storage.
Interview tip → Mention that object storage is usually the cleaner design.
More on Configuration, Secrets and storage
How do you inject configuration into pods and what are the options?BeginnerA ConfigMap was updated but the pod still shows old values. Why?IntermediateHow do you store a database password safely in Kubernetes?BeginnerHow do you manage secrets in GitOps without committing them in plain text?IntermediateA pod fails with `CreateContainerConfigError` and a missing key. What happened?BeginnerWhat is the difference between emptyDir, hostPath, PV/PVC and when do you use each?Beginner