Skip to content

Rate this page
Thanks for your feedback
Thank you! The feedback has been submitted.

Get free database assistance or contact our experts for personalized support.

Define environment variables for cluster components

To pass environment variables into PostgreSQL, pgBackRest, or pgBouncer Pods, use the Custom Resource options described in Custom Resource options. For example:

  • PostgreSQL instances: use spec.instances[].env, spec.instances[].envFrom, or reference a Secret via spec.instances[].envVarsSecret.
  • pgBackRest: use the relevant spec.backups.pgbackrest.* or restore job options and any supported env or Secret references.
  • pgBouncer: use spec.proxy.pgbouncer.env, spec.proxy.pgbouncer.envFrom, or spec.proxy.pgbouncer.envVarsSecret.

Sensitive values (passwords, API keys) should be stored in Kubernetes Secrets and referenced by name in the cluster spec. For more options, see Secrets options and the Custom Resource options reference.


Last update: February 13, 2026
Created: February 13, 2026