Prompt
What storage works best if my app writes files from both Linux VMs and Kubernetes pods?
Latest observation
If both your Linux VMs and Kubernetes pods need to read/write the same files, the best fit is usually shared network storage rather than local disk.
Best options
1. NFS / file storage
Best overall for shared files.
- Works well with both VMs and pods
- Supports a normal POSIX-like filesystem model
- Easy to mount from Linux
- Common choice for:
- app uploads
- shared working directories
- config/assets
- pipelines that need a common filesystem
Good when: your app expects “a folder” that multiple machines can use.
Watch out for:
- single-server NFS can be a bottleneck or SPOF
- performance may be limited for very high IOPS workloads
- permissions/locking need to be handled carefully
2. Managed file shares
Examples:
- AWS EFS
- Azure Files
- Google Filestore
These are cloud-managed versions of the NFS/shared-files approach.
Pros
- easier ops than self-managed NFS
- mountable from both VMs and Kubernetes
- often scalable and highly available
Good when: you want shared filesystem semantics without running storage servers yourself.
3. Distributed file systems
Examples:
- CephFS
- GlusterFS (less common now)
Pros
- more scalable and resilient than basic NFS
- can support many clients
Cons
- more complex to operate
Good when: you need shared filesystem access at scale and can handle extra complexity.
Usually not the best for this use case
Block storage
Examples:
- AWS EBS
- Azure Disk
- GCE Persistent Disk
These are attached to one VM/node at a time, so they’re not a good shared-write solution for multiple VMs/pods.
Object storage
Examples:
- S3
- Azure Blob
- GCS
Great for files, backups, media, and artifacts, but not a true filesystem. If your app needs POSIX file semantics, object storage is usually a poor direct fit.
Kubernetes-specific note
For pods, you’d typically use:
- a PersistentVolume backed by NFS/EFS/Azure Files/Filestore/CephFS
- or mount the same shared storage via a CSI driver
For VMs, the same storage can be mounted directly over the network.
Simple recommendation
If your app needs a shared writable directory from both Linux VMs and Kubernetes pods:
Use managed shared file storage (NFS-style), such as EFS / Azure Files / Filestore, or self-managed NFS if you prefer control.
If you want, I can recommend the best choice for your specific cloud provider and workload pattern.