Re:Homelab: Running Postgres on Kubernetes
by turtles3 on Tuesday January 02, 2024 @01:18PM
(#38844907)
A subtle advantage of cnpg is that it doesn't use statefulsets, instead the operator handles things like mapping storage volumes and stable identities. Regular kubernetes statefulsets have some tricky sharp edges for failure recovery.
I don't know if all of these alternatives use statefulsets but I remember several doing so.
I've personally found cnpg to be pretty robust, and supports everything you will eventually need once you're locked into a solution (eg. Robust backups, CDC, replica clusters).
I'm yet to find anything of a similar standard for mysql.
EDIT: it should also be noted that CrunchyData is a proprietary solution and requires a license to use in production. This is not particularly obvious from their docs.
Re:Homelab: Running Postgres on Kubernetes
by activescott on Tuesday January 02, 2024 @03:46PM
(#38846950)
What sharp edges are you referring to with statefulsets?
Re:Homelab: Running Postgres on Kubernetes
by turtles3 on Tuesday January 02, 2024 @04:51PM
(#38847585)
Cnpg's docs articulate this better than I could:
https://cloudnative-pg.io/documentation/1.16/controller/
Statefulsets have their place but are surprisingly inconvenient for database workloads.
OperatorHub is currently the main resource I use, but GitHub stars aren't exposed in the search so I have been looking at the "Capability Level" chart and checking for Github popularity when I find one with the feature support I want.
I'm facing this exact same issue now when trying to find an operator for Redis. I am not sure if I am just missing out on the "right" option by limiting myself to Googling and Operator Hub and looking for the one with the most Github stars, so I am open to tips.