🌐
Groundcover
groundcover.com › observability, for the cloud. › groundcover blog | check our latest articles › postgres in kubernetes: how to deploy, scale, and manage
Postgres in Kubernetes: How to Deploy, Scale, and Manage
October 23, 2025 - A Pod in Kubernetes is one or more containers that host a given workload. When running Postgres, you’d deploy the Postgres software as a Pod. Because PostgreSQL is a database that stores data persistently, it needs access to persistent storage ...
🌐
Reddit
reddit.com › r/kubernetes › how are you running postgresql on kubernetes?
r/kubernetes on Reddit: How are you running PostgreSQL on Kubernetes?
October 12, 2024 -

Running databases in containers has long been considered an anti-pattern. However, the Kubernetes ecosystem has evolved significantly, allowing stateful workloads, including databases, to thrive in containerized environments. With PostgreSQL continuing its rise as one of the world’s most beloved databases, it’s essential to understand the right way to run it on Kubernetes.

To explore this, our host (formerly with Ubisoft, Hazelcast, and Timescale) is hosting a webinar:

Title: PostgreSQL on Kubernetes: Do's and Don'ts

Time: 24th of October at 5 PM CEST.

Register here: https://lu.ma/481tq3e9

If you're not joining, I would, in any case, love to hear your thoughts on this!

Discussions

kubernetes - Access my Postgresql database inside a Kubernates pod from my computer with pgAdmin - Stack Overflow
I installed a Postgresql database with Kubernetes into one of my pod. The communication works fine beetwen application in the other pods and my database and I can access it with those commands: kub... More on stackoverflow.com
🌐 stackoverflow.com
Experiences with running PostgreSQL on Kubernetes
Also I'd be curious to see if "most people" actually use Ceph vs network storage like EBS volumes where AWS guarantees me that I won't have data corruption issues in exchange for money · Disclosure: I work at the company that published this post More on news.ycombinator.com
🌐 news.ycombinator.com
51
167
January 27, 2018
Have you ever used PostgreSQL on Kubernetes in production?
Most of this can be handled by an operator: https://access.crunchydata.com/documentation/postgres-operator/latest/ https://github.com/percona/percona-postgresql-operator https://github.com/zalando/postgres-operator Zalando is a big company running this in prod so it's absolutely possible. More on reddit.com
🌐 r/kubernetes
12
12
April 30, 2022
Implementing postgres on a kubernetes cluster for production. Any guides, articles, checklist, etc?
I would caution against this. Dev or staging might be fine but unless you’re a DBA with extensive experience managing postgresql clusters and know all the settings and knobs to turn to fine tune the clusters, I’d go with managed services like RDS/AuroraDB for production. It’s worth the money to not have to manage everything yourself, especially the auto expanding storage in AuroraDB. Regular backups are also made for you and restores from said backups are easy. Option for global availability is also there for disaster recovery and automatic failover to another availability zone. RDS proxy is also useful to add as another layer of protection. If you still want to go down the self hosting path, I would try to back up the DB as often as possible and practice restores. And always monitor how much disk space you have left so you can get ahead of expanding the storage. And hire a DBA. Good luck! More on reddit.com
🌐 r/kubernetes
49
38
March 23, 2023
🌐
CloudNativePG
cloudnative-pg.io
CloudNativePG - PostgreSQL Operator for Kubernetes
CloudNativePG is the Kubernetes operator that covers the full lifecycle of a highly available PostgreSQL database cluster with a primary/standby architecture, using native streaming replication.
🌐
CNCF
cncf.io › blog › 2023 › 09 › 29 › recommended-architectures-for-postgresql-in-kubernetes
Recommended architectures for PostgreSQL in Kubernetes | CNCF
November 6, 2024 - With my amazing team we decided to push the limits of local storage in Kubernetes and see how it was performing, compared to bare metal and VM solutions that we had been deploying for over a decade on some of the largest installations of PostgreSQL around the world.
Top answer
1 of 3
2

To access the database, you can expose the pgadmin tool via a Load-Balancer or Ingress controller. This is not always ideal from a security standpoint- as you are trusting the pgadmin tool to properly handle security. Another way to do this is to expose the pgadmin tool via cluster IP - or an internal IP address. This means, that those people outside of your clusters network, cannot access it. Then for you to access the tool, you would have to add a ssh/vpn tunnel or use kubernetes port-forwarding tool.

For deployment, this helm chart seems to be fairly reasonable, and you can control how you expose the admin utility.

Personally, if security is not of the upmost importance, I would expose pgadmin via an ingress controller. This would be the most convenient way to access the tool.

As for your second question, you can run postgress inside of a pod - but you need to make sure you have a persistent volume setup as the datastore location - as pods should be considered ephemeral. If you are struggling with how to start, I usually find Bitnami's offerings (free) a really good place to begin. Here is the link to the helm chart for postgress SQL. With Bitnami's charts, make sure to set the passwords and accounts during the deployment process- otherwise the deployment will work the first time, but not if you have to redeploy - as the randomly generated passwords will change.

As a note, with some helm charts I use the --dry-run flag to get the raw yaml which I use to do a more standard kubernetes deployment. Make sure to set your helm options properly, and then add that flag. This can be easier if you are just starting and are trying to customize something that does not have a built-in argument.

2 of 3
0

i guess you should have service object to make it accessable via ingress or nodePort.

For secound question: answer is not so clear and it depends on what you want achive.

As Ben said above, you have to make sure that you have peristent volume on which you can trust. As i know amazon could deliver some solutions but i dont konow if you want to store youre data into third party companies.

Find elsewhere
🌐
PostgreSQL
postgresql.org › about › news › kubegres-is-available-as-open-source-2197
PostgreSQL: Kubegres is available as open source
April 21, 2021 - [Kubegres](https://www.kubegres.io) is an open-source Kubernetes operator allowing to deploy a cluster of PostgreSql instances with data replication enabled out-of-the box. …
🌐
Hacker News
news.ycombinator.com › item
Experiences with running PostgreSQL on Kubernetes | Hacker News
January 27, 2018 - Also I'd be curious to see if "most people" actually use Ceph vs network storage like EBS volumes where AWS guarantees me that I won't have data corruption issues in exchange for money · Disclosure: I work at the company that published this post
🌐
Medium
medium.com › @dinhnguyen1812 › deploying-a-postgresql-cluster-on-kubernetes-for-beginners-8c90e55a5647
Deploying a PostgreSQL Cluster on Kubernetes for Beginners | by Dinh Nguyen | Medium
May 29, 2025 - +----------------------+ +-----------------+ +----------------------+ | | | | | | | Kubernetes Cluster | <----> | PostgreSQL Pods | <--> | MinIO Storage | | | | (Postgres-Op) | | (S3-compatible) | +----------------------+ +-----------------+ +----------------------+ | | | Kubernetes manages pods, scaling, | Backups automatically | failover, and pod health | uploaded to MinIO
🌐
DigitalOcean
digitalocean.com › community › tutorials › how-to-deploy-postgres-to-kubernetes-cluster
How to Deploy Postgres to Kubernetes Cluster | DigitalOcean
March 25, 2026 - How to Deploy Postgres to Kubernetes Cluster is a common question for teams that want database control while keeping app and infrastructure workflows in one platform. In this tutorial, you will deploy PostgreSQL on Kubernetes with a StatefulSet, persistent volumes, Secrets, and Services, then verify that data survives pod restarts.
🌐
OptimaData
optimadata.nl › home › how to postgres on kubernetes
How to Postgres on Kubernetes | OptimaData
February 17, 2025 - How to deploy PostgreSQL databases on Kubernetes - review, tutorial and demo with step by step description how to setup.
🌐
Conf42
conf42.com › Internet_of_Things_IoT_2024_Chris_Engelbert_kubernetes_postgresql_cluster
PostgreSQL on Kubernetes: Dos and Don'ts | Conf42
December 19, 2024 - Running a database in Kubernetes isn’t easy. That’s true for PostgreSQL itself. Optimizing it for performance and latency is even harder. Let’s find the Dos and Don’ts for Postgres on Kubernetes. And yes, there is more than using an operator, but it's a good start.
🌐
Portworx
portworx.com › home › choosing a kubernetes operator for postgresql
Choosing a Kubernetes Operator for PostgreSQL | Portworx
December 5, 2025 - The operator can be installed on a Kubernetes cluster with Helm Chart or YAML files available on the operator’s GitHub repository. Let us install it directly using the operator YAML manifest: ... kubectl apply --server-side -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.24/releases/cnpg-1.24.1.yaml · This installation configures a PostgreSQL operator for Kubernetes, setting up resources in the cnpg-system namespace to manage PostgreSQL clusters.
🌐
DEV Community
dev.to › thatcloudexpert › deploying-postgresql-on-kubernetes-2024-guide-4hb3
Deploying PostgreSQL on Kubernetes: 2024 Guide - DEV Community
November 18, 2024 - In conclusion, deploying PostgreSQL on Kubernetes, specifically on Amazon Elastic Kubernetes Service (EKS), has become increasingly efficient and versatile.
🌐
Medium
araji.medium.com › how-you-should-deploy-and-use-postgresql-databases-in-kubernetes-5ad1838fbb06
How You Should Deploy and Use PostgresQL Databases in Kubernetes? | by Amine Raji | Medium
May 5, 2025 - How You Should Deploy and Use PostgresQL Databases in Kubernetes? Bootstrapping a Per‑Application Highly‑Available PostgreSQL Cluster with CloudNativePG, Terraform & GitOps. A step‑by‑step …
🌐
DEV Community
dev.to › dm8ry › simulating-database-operations-with-postgresql-on-kubernetes-4286
Simulating Database Operations with PostgreSQL on Kubernetes - DEV Community
October 20, 2024 - In this article, we'll walk through deploying a PostgreSQL database in a Kubernetes (k8s) environment and simulating various database operations using Python. We will set up a PostgreSQL instance along with ten pods that will perform updates, inserts, deletes, and selects on the database.
🌐
Portworx
portworx.com › home › kubernetes postgresql operator by portworx
Kubernetes PostgreSQL Operator | Deployment Service | Portworx
December 11, 2025 - This post will walk you through deploying PostgreSQL on Kubernetes platforms, including a detailed step-by-step guide, deployment strategies, benefits, configurations for monitoring, backup, and restore, and best practices.
🌐
Refine
refine.dev › home › blog › engineering › how to deploy postgres on kubernetes
How to deploy Postgres on Kubernetes | Refine
January 22, 2024 - This article will serve as a guide for installing PostgreSQL on Kubernetes, covering pre-requisites such as setting up Kubectl, Kubernetes clusters, and Docker.