Put open source to work
July 16–17, 2018: Training & Tutorials
July 18–19, 2018: Conference
Portland, OR

pgKubernetes tutorial

Josh Berkus (Red Hat)
1:30pm5:00pm Monday, July 16, 2018
Level: Intermediate
Average rating: ****.
(4.00, 5 ratings)

Who is this presentation for?

  • DevOps engineers, database administrators, system architects, cloud architects, and container application developers

Prerequisite knowledge

  • Familiarity with the Linux command line, system administration topics, and container concepts

Materials or downloads needed in advance

  • A laptop (Linux or a laptop capable of running a VM with 4 GB of RAM)
  • Complete the installation and setup requirements (shared in the pgKubernetes repository 10 days before OSCON)

What you'll learn

  • Explore options for deploying databases on Kubernetes
  • Learn how to deploy a Postgres, Patroni, and OpenShift stack, how to manage and configure Postgres on Kubernetes, and how to incorporate containerized databases into a DevOps workflow


Over the last year, it has become not only possible but also compelling to run many of your database workloads on Kubernetes—and it’s simpler than you think. Join Josh Berkus to learn how to build and configure your own high-availability, containerized database application stack using Postgres, Patroni, and OpenShift.

Josh begins by discussing the trade-offs in complexity, utility, and performance involved in running PostgreSQL on Kubernetes. You’ll explore some of the frameworks used for high-availability containerized Postgres, focusing on the simplest and easiest of them: the “80% solution,” Patroni. Along the way, Josh details several of the storage options available for databases on Kubernetes and OpenShift.


A brief history of stateful applications on Kubernetes


  • Managing trade-offs
  • Real-life use cases: Zalando, bugs.python.org
  • Peformance trade-offs
  • A comparison of high-availability frameworks


  • “The 80% solution”
  • How containerized HA works
  • What’s inside the container
  • Testing HA and failover


  • Operator versus manual
  • OpenShift versus Kubernetes deployments
  • Sample deployment on MiniShift


  • DevOps-ing database management
  • Managing database contents
  • Administration API versus Operator API
  • Disaster recovery

Further work

  • Production storage options
  • Public cloud considerations
  • Customizing deployment
  • Contributing to the project
Photo of Josh Berkus

Josh Berkus

Red Hat

Josh Berkus is a Kubernetes community manager at Red Hat, where he works with the Kubernetes community to automate all the things, including databases. He has contributed to PostgreSQL, Docker, OpenOffice, and many other projects. In his free time, he makes pottery and metalwork. Josh first spoke at OSCON in 2004.

Comments on this page are now closed.


Picture of Josh Berkus
07/10/2018 10:05am PDT

Apologies, I just pushed some instructions. I may have additional instructions on caching images tommorrow, but the primary ones are there for setup.

Picture of Diane Downie
Diane Downie | ARCHITECT
07/10/2018 7:59am PDT

The install instructions link on this page goes to a “placeholder” readme. Is the link incorrect or will the details be forthcoming?