Sharing files between pods

2/5/2019

I have a service that generates a picture. Once it's ready, the user will be able to download it.

What is the recommended way to share a storage volume between a worker pod and a backend service?

-- Sahbi BG
kubernetes

2 Answers

2/5/2019

Personally i will not recommended it to do. better then that you two container side one pod if having dependency on each other. so if one pod goes fail that file manager also delete and create at particular time if needed

-- Harsh Manvar
Source: StackOverflow

2/5/2019

In general the recommended way is "don't". While a few volume providers support multi-mounting, it's very hard to do that in a way that isn't sadmaking. Preferably use an external services like AWS S3 for hosting the actual file content and store references in your existing database(s). If you need a local equivalent, check out Minio for simple cases.

-- coderanger
Source: StackOverflow