RTFM
So helpful. Feeling cool now? good. At least provide a link to the docs you speak of.
This depends on what storage provider plugin you're using. Afaik it's kinda easier to share a volume if you have multiple containers in the same pod, instead of sharing it between multiple pods. Consider putting your services into the same pod _if their life-cycle is the same_. This is usually an anti-pattern though, and kinda hints at bad architecture, but I don't know more about your situation to judge. Cloud storage providers typically can't have the same volume mounted on multiple nodes, this means that if you want to mount the same volumeClaim on multiple pods you have to ensure the pods are all scheduled on the same node. Some storage providers _can_ handle multiple writers over the network, like the NFS one for example, but I don't have much experience with that.
Here's a tutorial on the multiple containers per-pod approach https://kubernetes.io/docs/tasks/access-application-cluster/communicate-containers-same-pod-shared-volume/
oh, and the stackoverflow answers here honestly explains things better than I did, so take a look https://stackoverflow.com/questions/31693529/how-to-share-storage-between-kubernetes-pods
Thank you, yes between pods/containers i am able to share the files.. but when a new node is created by the autoscaling.. then i dont have access to files from that new node , so i think i need a nfs server or glusterfs someone said
Maybe. Or again, consider whether putting the containers in the same pod is maybe right for you, or if you can replace the shared volume with some kind of a stand-alone database server instead, which would have its own separate life-cycle then.
Обсуждают сегодня