Assign PostgreSQL RBAC Roles
Starting in v4.3.0, the PostgreSQL Operator ships five aggregated user-facing roles for segregation of duties: admin, edit, view, backup, and restore. This guide shows how to grant each role to a user or group via a RoleBinding.
Overview
admin aggregates edit, view, backup, and restore. edit and view also aggregate to the namespace-developer scope, so users already holding namespace-developer inherit them automatically.
Procedure
Each example grants the role in a single namespace. Replace $NAMESPACE, $USER, and $GROUP with your values.
Grant admin
Grant edit
Allows developers to create and update postgresql instances without deleting them.
Grant view
Read-only access for auditors or support engineers.
Grant backup
Lets a user create postgresbackups without touching cluster configuration.
Grant restore
Grants the ability to create and manage postgresrestores only.
Verification
Confirm the binding took effect with kubectl auth can-i: