3 ms·
This is not a snark or a judgemental question. What is a reason someone would want to run Postgres on Kubernetes? I associate Kubernetes with stateless servic
by reacharavindh 3y ago
This is not a snark or a judgemental question.
What is a reason someone would want to run Postgres on Kubernetes?
I associate Kubernetes with stateless services that can canary deployed, blue-green deployments, auto restarts upon memory crashes, auto scaling etc.
But, I cannot think of any practical reason one would want such events on a database that one relies on for keeping the state?!
What am I missing?
Are there any toy use cases where people are using Postgres for where they can afford(and want) kuberneyes to rolling deploy, and crash restart Postgres instances?
In that case, why Postgres in the first place?
- gbartolini 3y agoThe reason could be the last 4 years of evolution in Kubernetes. Have you heard of DoK Community (Data on Kubernetes)? Might be a good place where to start.
- gbartolini 3y agoI'm the author of this blog article in which I try to recap why running Postgres in Kubernetes is a good thing: https://cloudnativenow.com/kubecon-cnc-eu-2022/why-run-postgres-in-kubernetes/ https://cloudnativenow.com/kubecon-cnc-eu-2022/why-run-postg...
- reacharavindh 3y agoI did read the article you linked. It does touch a little bit on potential benefits of having databases managed the same way the services using them are, and integration tests that include the database. However, I’m still scratching my head how any of that is better or not possible with a Postgres installation that is outside of kubernetes. Let’s take out the management part of databases themselves - assume a managed database service like RDS POSTGRES. why would one want to run Postgres on EKS over having their pods on EKS talking to RDS Postgres? I feel like I’m missing some technical reason/advantage that makes all these people choosing to run Postgres on Kunernetes with operators and what not. What does Kubernetes bring to this table over a separate Postgres that dont run the risk of kubernetes interfering with the reliability or operation?
- timacles 3y agoThe only reason is if you have a bunch of micro service apps that need their own small db that can be quickly spun up, and you already run everything else in kubernetes. A very niche use case that doesn’t apply to 95% of shops. All the rest of replies just make my eyes roll, it’s like reading promotional pamphlets devoid of any context.