How to deploy a PostgreSQL Cluster on Kubernetes + OpenEBS

Why Postgres on Kubernetes?

Well, the answer is in the question. If you are already running Kubernetes on some form of cloud, you understand the ease-of-use, scalability and monitoring benefits of Kubernetes that you can apply to your database at scale.

PostgreSQL is the preferred relational database for most developers around, although setting up a highly available Postgres cluster from scratch is always a challenge, being cloud-native adds a bit to the difficulty.

Since availability requires multi-node Kubernetes deployment instead of local Minikube setup, I’ll deploy crunchy-postgres on my existing K8s cluster on AWS with two worker nodes. If you don’t have a Kubernetes cluster yet, see the instructions to deploy one using StackPointCloud. Instructions after that are same in any cloud or on-premises deployment.

2 Comments

8 months ago

me

•

8 months ago

It should be quick, container images are fairly small in size. Usually, it takes me around 15-30 secs(first-time) and faster later when containers are local unless there is some other issue. Can you get the list of pods and run “kubectl describe pod” on stuck pods.
Are you using Rancher by any chance or vanilla Kubernetes on Linux?