Skip to content
Postgres operator creates and manages PostgreSQL clusters running in Kubernetes
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
charts/postgres-operator Fix CRD-based operator configuration (#541) Apr 15, 2019
cmd reflect change in github url (#496) Feb 25, 2019
docker Fix typo in port (#219) Feb 2, 2018
docs Add paragraph on how to extend operator configuration in dev docs (#538) Apr 9, 2019
hack reflect change in github url (#496) Feb 25, 2019
manifests Fix CRD-based operator configuration (#541) Apr 15, 2019
pkg Fix CRD-based operator configuration (#541) Apr 15, 2019
.gitignore Add pod diagram and tex sources (#472) Jan 31, 2019
.golangci.yml add .golangci.yml (#422) Nov 27, 2018
.travis.yml Fix build (#542) Apr 15, 2019
.zappr.yaml Restore .zappr.yaml (#405) Nov 7, 2018
CODEOWNERS
CONTRIBUTING.md reflect change in github url (#496) Feb 25, 2019
LICENSE
MAINTAINERS [WIP] Draft codeowners, update maintainers (#358) Aug 6, 2018
Makefile Fix for broken Makefile (#522) Mar 25, 2019
README.md
SECURITY.md docs(general): Adding Security.md (#88) Sep 4, 2017
build-ci.sh reflect change in github url (#496) Feb 25, 2019
delivery.yaml
glide.lock Post-graduation updates (#495) Feb 26, 2019
glide.yaml reflect change in github url (#496) Feb 25, 2019
mkdocs.yml reflect change in github url (#496) Feb 25, 2019
run_operator_locally.sh Fix run operator locally (#462) Jan 29, 2019

README.md

Postgres Operator

Build Status Coverage Status Go Report Card GoDoc golangci

Introduction to the Postgres Operator

The Postgres operator manages PostgreSQL clusters on Kubernetes:

  1. The operator watches additions, updates, and deletions of PostgreSQL cluster manifests and changes the running clusters accordingly. For example, when a user submits a new manifest, the operator spawns a new Postgres cluster with necessary entities such as StatefulSets, Services, and also Postgres roles. See this Postgres cluster manifest for settings that a manifest may contain.

  2. The operator also watches updates to its own configuration and alters running Postgres clusters if necessary. For instance, if a pod Docker image is changed, the operator carries out the rolling update. That is, the operator re-spawns one-by-one pods of each StatefulSet it manages with the new Docker image.

  3. Finally, the operator periodically synchronizes the actual state of each Postgres cluster with the desired state defined in the cluster's manifest.

  4. The operator aims to be hands free and configuration happens only via manifests and its own config. This enables easy integration in automated deploy pipelines with no access to Kubernetes directly.

Getting started

For a quick first impression follow the instructions of this tutorial.

Google Summer of Code

The Postgres Operator made it to the Google Summer of Code 2019! As a brand new mentoring organization, we are now looking for our first mentees. Check our ideas and start discussion in the issue tracker. And don't forget to spread a word about our GSoC participation to attract even more students.

Table of contents

The rest of this document is a tutorial to get you up and running locally with the operator on Minikube.

Overview of involved entities

Here is a diagram, that summarizes what would be created by the operator, when a new Postgres cluster CRD is submitted:

postgresql-operator

This picture is not complete without an overview of what is inside a single cluster pod, so let's zoom in:

pod

These two diagrams should help you to understand the basics of what kind of functionality the operator provides.

There is a browser-friendly version of this documentation at postgres-operator.readthedocs.io

Community

There are two places to get in touch with the community:

  1. The GitHub issue tracker
  2. The #postgres-operator slack channel under Postgres Slack
You can’t perform that action at this time.