Skip to content

The kubepost operator provides full lifecycle management for PostgreSQL objects.

License

Notifications You must be signed in to change notification settings

orbatschow/kubepost

Repository files navigation

kubepost

kubepost

build Latest releases

The kubepost operator provides Kubernetes native deployment and management of PostgreSQL objects. The purpose of this project is to simplify and automate the configuration of PostgreSQL objects.

Project status: beta Not all planned features are completed. The API, spec, status and other user facing objects may change, but in a backward compatible way.

Features

The kubepost operator implements, but is not limited to, the following features:

Prerequisites

Note: This compatibility matrix is not tested at the moment, it is only provided based on personal experience. Therefore, it may also be possible, that other combinations are working properly.

Kubernetes PostgreSQL kubepost
1.24 12,13,14 >=1.0.0
1.25 12,13,14 >=1.0.0

CustomResourceDefinitions

A core feature of kubepost is to monitor the Kubernetes API server for changes to specific resources and ensure that the desired PostgreSQL match these resources.

  • Connection, which defines connections for one or multiple PostgreSQL clusters, that shall be managed by kubepost.

  • Role, which defines a PostgreSQL role and its permissions, that shall be managed by kubepost.

  • Database, which defines a PostgreSQL database and its extensions, that shall be managed by kubepost.

The kubepost operator automatically detects changes in the Kubernetes API server to any of the above objects, and ensures that matching PostgreSQL objects are kept in sync.

Quickstart

Installation

Note: this quickstart does provision the kubepost stack, required to access all features of kubepost.

kubectl apply -f deploy/bundle.yaml

Note: deploy/bundle.yaml may be unstable, if you plan to run kubepost in production please use a tagged release.

Tagged versions can be installed using the following command:

kubectl apply -f https://github.com/orbatschow/kubepost/releases/download/v0.4.0-rc.2/bundle.yaml

Note: The tag used above might not be pointing to the latest release. Check the git tags within this repository to get the latest tag.

To learn more about the CRDs introduced by kubepost have a look at the getting started guide.

Removal

To remove the operator, first delete any custom resources you created in each namespace.

for n in $(kubectl get namespaces -o jsonpath={..metadata.name}); do
  kubectl delete --all --namespace=$n roles.postgres.kubepost.io,connections.postgres.kubepost.io,databases.postgres.kubepost.io
done

After a couple of minutes you can go ahead and remove the operator itself.

kubectl delete -f deploy/bundle.yaml

Troubleshooting

Before creating a new issue please check the whole documentation.

Contributing

Contributions are always welcome, have a look at the contributing guidelines to get started.

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website.