Postgres operator creates and manages PostgreSQL clusters running in Kubernetes
Go to file
erthalion f356225c04 Change to user/admin/developer 2018-06-01 11:32:50 +02:00
cmd Remove the second namespace prefix from the operator configmap name 2018-02-16 12:30:07 +01:00
docker Fix typo in port (#219) 2018-02-02 15:51:26 +01:00
docs Change to user/admin/developer 2018-06-01 11:32:50 +02:00
manifests Rename RBAC file 2018-05-17 12:05:31 +02:00
pkg Merge pull request #295 from zalando-incubator/continue_on_delete_errors 2018-05-22 10:44:43 +02:00
.gitignore Initial implementation for the statefulset annotations indicating rolling updates. 2018-05-07 08:07:37 +02:00
.travis.yml Some fixes for travis ci and cdp 2018-03-27 16:05:13 +02:00
.zappr.yaml Add .zappr configuration 2017-05-12 14:51:56 +02:00
CONTRIBUTING.md Change the broken reference. 2017-05-12 14:56:22 +02:00
LICENSE Move license to the root folder. 2017-05-12 16:16:07 +02:00
MAINTAINERS Add MAINTAINERS and CONTRIBUTING guidelines. 2017-05-12 12:17:49 +02:00
Makefile Improvements for debug mode 2018-02-02 11:17:12 +01:00
README.md Change to user/admin/developer 2018-06-01 11:32:50 +02:00
SECURITY.md docs(general): Adding Security.md (#88) 2017-09-04 14:33:30 +02:00
build-ci.sh Use zalando incubator instead of an old repo 2017-05-12 14:57:58 +02:00
delivery.yaml Some fixes for travis ci and cdp 2018-03-27 16:05:13 +02:00
glide.lock Use deepcopy to propagate the spec to clusters. 2018-05-17 16:05:12 +02:00
glide.yaml Use deepcopy to propagate the spec to clusters. 2018-05-17 16:05:12 +02:00
run_operator_locally.sh Rename RBAC file 2018-05-17 12:05:31 +02:00

README.md

Postgres Operator

Build Status Coverage Status Go Report Card

Introduction

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 fetches that manifest and spawns a new Postgres cluster along with all necessary entities such as Kubernetes StatefulSets and 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.

Quickstart

Prerequisites:

Local execution

git clone https://github.com/zalando-incubator/postgres-operator.git
cd postgres-operator

minikube start

# start the operator; may take a few seconds
kubectl create -f manifests/configmap.yaml  # configuration
kubectl create -f manifests/operator-service-account-rbac.yaml  # identity and permissions
kubectl create -f manifests/postgres-operator.yaml  # deployment

# create a Postgres cluster
kubectl create -f manifests/minimal-postgres-manifest.yaml

# tear down cleanly
minikube delete

We have automated these steps for you:

cd postgres-operator
./run_operator_locally.sh
minikube delete

Running and testing the operator

The best way to test the operator is to run it in minikube. Minikube is a tool to run Kubernetes cluster locally.

Configuration Options

The operator can be configured with the provided ConfigMap (manifests/configmap.yaml).

Table of contents