The database reef

Every command of the database reef: a PostgreSQL per Database, owned by a node of the tenancy tree

O reef database

Todos os comandos do reef database: um PostgreSQL por Database, de um nó da árvore de tenancy

Setup

What makes a Database?

Preparação

O que faz uma Database?

Setup · reef applybuilt

The database reef: one kind, Database

Preparação · reef applypronto

O reef database: um kind, Database

~/example
# The release reef with flux comes first: the Nereid releases the operator through it$ nereus reef apply database✓ core/reefs/database 0.1.0 created (database.getnereus.dev/v1alpha1: databases) Next steps:   nereus database --help  nereus nereid apply <nereid> --reef database
Setup · nereid applybuilt

The cloudnative-pg Nereid makes the reef's default Mandate

Preparação · nereid applypronto

A Nereid cloudnative-pg cria o Mandate default do reef

~/example
# CloudNativePG's operator, its chart pinned by version and SHA-256$ nereus nereid apply cloudnative-pg \    --reef database✓ core/nereids/cloudnative-pg created, Ready, pinned to sha256:4908bacf6ac8: see 'nereus database --help'  core/mandates/cloudnative-pg created (reef: database, nereid: cloudnative-pg, default) Next steps:   nereus database create <name> --owner project/<name> --engine postgres
Use

How does a Workload get one and reach it?

Uso

Como um Workload pede uma e chega a ela?

Use · database createbuilt

A Database names its owner in the tenancy tree

Uso · database createpronto

Uma Database diz o seu owner na árvore de tenancy

~/example
# In nereus-system, for Keycloak$ nereus database create keycloak \    --owner project/nereids \    --engine postgres✓ database/databases/keycloak created (mandate: cloudnative-pg, nereid: cloudnative-pg) Next steps:   nereus database get keycloak
Use · database get, listbuilt

Ready, with its connection in a Secret

Uso · database get, listpronto

Ready, com a conexão num Secret

~/example
$ nereus database get keycloakName:        keycloakOwner:       Project/nereidsEngine:      postgresMandate:     cloudnative-pgNereid:      cloudnative-pgReady:       TrueConnection:  secret nereus-system/keycloak-database (host, port, dbname, username, password, uri) $ nereus database listDATABASE  OWNER            ENGINE    MANDATE         READYkeycloak  Project/nereids  postgres  cloudnative-pg  True
Use · ownerbuilt

An owner missing from the tree is refused

Uso · ownerpronto

Um owner fora da árvore é recusado

~/example
$ nereus database create orders \    --owner project/missing \    --engine postgres✗ database/databases/orders: owner Project/missing does not exist. To fix it, run:  nereus tenancy project list  Nothing was changed.
Use · database deletebuilt

Delete removes the Secret, then the Cluster and its volume

Uso · database deletepronto

O delete remove o Secret, depois o Cluster e o seu volume

~/example
$ nereus database delete keycloak \    --dry-rundatabase/databases/keycloak deleted (dry run) $ nereus database delete keycloak2026-10-31T03:37:50Z  … secret   Deleting the Secret nereus-system/keycloak-database.2026-10-31T03:37:50Z  … cluster  Deleting the CloudNativePG Cluster nereus-system/db-keycloak: CloudNativePG removes its pods and volumes.✓ database/databases/keycloak deleted Next steps:   nereus database list