Thread: Re: PostgreSQL and Kubernetes

Re: PostgreSQL and Kubernetes

From
Alex Kliukin
Date:

On 30. Mar 2017, at 12:10, Moreno Andreo <moreno.andreo@evolu-s.it> wrote:

as databases aren't built for type of dynamic scheduling that something like kubernetes (or any other container management solution), due to how they interact with the filesystem, network stack, and more.
Further more, he suggests that because of this lack of integration, that if you do run your database in kubernetes/docker, you are very likely to encounter data corruption and data loss"

What's your advice?

I think dynamic scheduling just increases the chances of your database instance being killed. Your K8S cluster, if not configured properly, may decide to kill your master database pod when scaling down nodes in order to utilise resources efficiently.

If you run your PostgreSQL on K8S make sure you have a good and battle-tested HA setup, know your way around configuring both PostgreSQL streaming replication and Kubernetes cluster, and have a number of databases to manage, as it makes little sense to build an aircraft carrier to carry a single Cessna. 

 
Kind regards,
--
Oleksii “Alex" Kliukin