Available in:  EE

Experimental version. The functionality may undergo significant changes. Compatibility with future versions is not guaranteed.

This module provides an operator to manage PostgreSQL clusters in a Kubernetes-native way. It allows users to configure and scale PostgreSQL instances according to their needs, ensuring optimal performance and security.

Module enable

To enable module managed-postgres apply the following manifest:

apiVersion: deckhouse.io/v1alpha1
kind: ModuleConfig
metadata:
  name: managed-postgres
spec:
  enabled: true
  version: 1

After enabling the module, a cluster-wide resource PostgresClass with the name default will be created.

Quick start

For module’s usage examples see Usage section

Supported PostgreSQL versions

This module supports PostgreSQL versions 16 and above.

Our images for running PostgreSQL containers are based on official images with some modifications:

  • ru_RU.UTF-8 locale is included.
  • postgres processes is started under user with UID 64535.

Also our images are divided by operating system version (postgresVersion.imageOSCodename) and type (postgresVersion.imageType).

OS versions

  • bookworm - image based on Debian 12 slim, including most of the standard utilities (including bash).
  • distroless (only planned) - image contains only necessary components for PostgreSQL work.

Image types

There is a several types of images:

  • standard - standard image version, which included some PG extensions: pgaudit, pgvector, pg-failover-slots.
  • minimal - a lighter version of the image, without any PG extensions.

postgresVersion structure

By default module uses image with OS version bookworm, type standard and specified (by you) PostgreSQL version. So structure of postgresVersion looks like this:

postgresVersion:
  imageOSCodename: bookworm
  imageType: standard
  version: "17.4"