What is the current approach for dealing with persistent data?
What is the current approach for dealing with persistent data?
One approach, as another reply suggested, is to mount external volumes into the container, i.e. a persistent disk on GCP or Amazon EBS (or even a GCS or S3 bucket). This works, but of course the container, hosting the software that makes the data meaningful, is now bolted to a physical thing. It can no longer be moved, auto-scaled, etc. It can be monitored and restarted and you still get all the benefits of dependency isolation and repeatability. I'd still much, much rather run a DB this way than installing it directly onto an instance, but there's no use pretending that we can do with data what we can now do with code and config. It's still a cement block chained to our ankles.
ContainerShip, has CodexD (https://github.com/containership/codexd) which creates subvolumes for your containers on the fly using ephemeral/host storage, and can stream the data around to other servers in the cluster if containers are relocated.
(Disclosure: I'm a founder of ContainerShip)