Conference Schedule - PGConf.DE 2022

What we’ve learned about running a PostgreSQL managed service on Kubernetes

Date: 2022-05-13
Time: 10:25–11:10
Room: South Dakota
Level: Intermediate
Feedback: Leave feedback

Kubernetes is a good platform for deploying and running PostgresSQL. Deploying 100 Postgres clusters is as easy as deploying one, and there is no need to tinker with tools like Ansible or Puppet. Resource sharing can be applied when it makes sense, allowing to run multiple Postgres databases in isolation on a single instance, each storing the data on a dedicated persistent volume. There are great open-source tools out there to deal with high-availability and backups than support or can be easily integrated into the Kubernetes workflow. Monitoring and alerting is easy to implement. People reported success in running Postgres on Kubernetes before. But there are also rough edges, like memory management or certain Postgres maintenance operations, such as installing extensions, that normally cause unnecessary database downtimes on Kubernetes. They are less of a problem for in-house deployments, but may become a deciding factor when running a managed service, competing with other such services running on bare-metal servers or virtual machines that are free of those issues.

In this talk, I will share some of our learnings from running a managed PostgreSQL/TimescaleDB service on Kubernetes on AWS for a little more than a year: I’ll start with the motivation of running managed PostgreSQL on Kubernetes, the benefits and drawbacks. I’ll describe the architecture of the managed PostgreSQL cloud on Kubernetes I’ll zoom in on how we solved some of the Kubernetes-specific issues within our cloud, such as upgrading extensions without downtimes, taming the dreaded OOM killer, and doing regular maintenance and PostgreSQL major upgrades. I’ll share how open-source tools from the PostgreSQL ecosystem helps us to run the service and explain how we use them in a slightly non-trivial way.


The following slides have been made available for this session:


Oleksii Kliukin