4 ms·
I was considering deploying Postgres (as a container) into a Kubernetes cluster. Kubernetes takes care of service discovery, networking, persistent disk mountin
by dcgoss 11y ago
I was considering deploying Postgres (as a container) into a Kubernetes cluster. Kubernetes takes care of service discovery, networking, persistent disk mounting, moving the container if a server goes down, etc.
Wouldn't you have similar problems with Postgres without the container?
- takeda 11y agoI don't know kubernetes, but looks like it solves many of those issues already. I still believe the HA might be a challenge. Typically to make the database highly available you might set up a second one (or perhaps more) that replicates from the master. This can become problematic if the postgres containers will be moved around. As I said, I don't know kubernetes, if you for example can have containers that have state (e.g. you destroy and recreate it somewhere else, and they are exactly same) and also keep the same IP then this is not an issue, but if when you move it around and each instance is technically a new postgres, then such setup might become problematic. Regarding your question, the traditional way of running it is that you set up a host and run postgres on it. It doesn't move around so you need those solutions. Granted that for example if you implement service discovery for example if something happens to a host, you can set up another and quickly point everything to it.