Live data from Hacker News

PostgreSQL: Kubegres is available as open source

postgresql.org

11–20 of 28 posts

Re: PostgreSQL: Kubegres is available as open source

#12

So I can create 2 servers running kubegres, kill one and then all data should be intact? And no downtime?

These things aren't magical. You will have some downtime because your connection to the database will be interrupted (after all, it just died, no way around it), and depending on your configuration, you may lose some data; you need at least one synchronous replica to ensure that no data is lost on an uncontrolled failover. If you have a two-node "cluster" with synchronous replication, then either one going down will stop writes on the master, so you would need at least three nodes.

Mind you, no clustered system can provide you zero downtime and zero data loss without essentially the same constraints. If you have an unplanned failure, there's going to be a blip somewhere. It's up to the rest of the system to recover from it gracefully.

When configuring any kind of cluster involving data (especially one that's supposed to recover automatically from faults), make sure you understand how it behaves and adjust for your application, because quite often the default configurations might accept some data loss in unplanned failover or conflict scenarios.

Re: PostgreSQL: Kubegres is available as open source

#13

Is it logical for AWS to offer RDS over K8s?

Logical for AWS or logical for their customers? Frankly probably not either way. RDS excels due to it deep integration with AWS proprietory block store. If you want your data in PVs RDS dose not offer enough, if you want you data on RDS then K8S scheduling wouldn't add much.

Re: PostgreSQL: Kubegres is available as open source

#15

Is it logical for AWS to offer RDS over K8s?

they already do in a way through aws-service-operator and replacement aws controllers for kubernetes (ACK)

https://aws.amazon.com/blogs/opensource/aws-service-operator... https://github.com/aws-controllers-k8s/community

Re: PostgreSQL: Kubegres is available as open source

#18
post #10
post #3

Since this is just a PR announcement by a third-party posted on an official PostgreSQL page: what is the difference between this and established PostgreSQL operators by Zalando and CrunchyData?

I was wondering this too and found: https://www.kubegres.io/#kubegres_compared It seems like the big difference is that it uses the standard PostgreSQL Docker images and doesn't bundle together as many things as Zalando or Crunchy Data. They'd likely argue that makes it easier to learn and a smaller surface area for attacks or things to go wrong. Crunchy Data includes lots of add-ons like pgBouncer, pgAdmin 4, pgMoni…

Then again you don't need a whole lot to have those features coupled with k8s. Kiss solution.

Re: PostgreSQL: Kubegres is available as open source

#19
post #17

Where I can read how modern k8s deals with persistent storage? It looks like after pg cluster shutdown you lose all data.

https://kubernetes.io/docs/concepts/storage/persistent-volum...

I use https://rook.io/ to set storage up usually, they have a bunch of different options and good documentation.

Re: PostgreSQL: Kubegres is available as open source

#20
From what I understand, you still have to solve the usual hard challenges of HA:

1) Applications reconnecting to the new Postgres master and retrying queries

2) Persistent storage available in multiple AZs or regions for your Postgres pods (impossible on AWS for example)

Post reply on HN