The module lifecycle stage: Preview
Available with limitations in: EE
Module Overview
The managed-postgres module manages PostgreSQL clusters in Kubernetes clusters.
It allows users to configure and scale PostgreSQL clusters according to their needs, ensuring optimal performance and security.
Main features:
- Automatic Deployment: Deploys a Postgres instance using a simple YAML configuration
- High Availability: Supports deployment of a highly available Postgres cluster or a standalone instance of your choice.
- Configuration Management: Separate
Postgres Classresource for templating the cluster creation approach with the ability to flexibly validate user configs - User and Database Management: Declarative model for creating users and logical databases.
- Status: Informative set of states for tracking the deployed Postgres.
Enabling the Module
To enable the managed-postgres module, 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 PostgresClass resource named default will be created automatically.
Quick Start
For module usage examples, see:
Main Resources
The Managed Service Postgres module provides tools for two conditional roles: User and Administrator.
The main module objects are Postgres, Postgres Class resources and the Postgres Operator state controller.
Conditional Administrator role:
- manages the cluster wide
Postgres Classresource and creates validation templates, scheduling rules, configuration for future services deployed in DKP. - Has access to the system namespace
d8-managed-postgres, wherePostgres Operatoris deployed, to its service logs, state.
Conditional User role: - manages the
Postgresresource and configures the service keep in mind thePostgres Classcreated by the Administrator.
Administrator Resources
PostgresClass
The PostgresClass resource allows you to restrict the creation of invalid configurations and predefine some values.
Every Postgres resource must be linked to an existing PostgresClass resource.
Before deploying the service, all configuration will be checked against the corresponding PostgresClass.
Detailed resource description
Postgres Operator
When the module is enabled, the Postgres Operator controller is deployed in the system namespace d8-managed-postgres
and reconciles the states of Postgres and the final service in all user namespaces.
User Resources
Postgres
The main resource that describes the state of the service.
It must be created within the user namespace and serves as the source of truth for the specific deployed postgres service.
Detailed resource description