Interview Prep/Kubernetes/Storage and volumes

A Deployment with one replica and an RWO PVC gets `Multi-Attach error` on every rollout.

BeginnerTroubleshootingStorage and volumes
Answer

Likely causes → RollingUpdate starts the new Pod before the old one stops. If the new Pod lands on a different node, the volume is still attached to the old node.

Diagnose →

kubectl get deploy app -o jsonpath='{.spec.strategy}{"\n"}'

Fix → Use strategy: {type: Recreate} for single-writer volumes, or move the workload to a StatefulSet. If the app supports it, use shared storage (EFS, ReadWriteMany) instead.

Prevent → Rule of thumb: RWO PVC means Recreate or StatefulSet, never a rolling Deployment.

All Kubernetes questions Roadmap: Kubernetes networking, storage & scaling

More on Storage and volumes