postgresql
PostgreSQL (Postgres) is an open source object-relational database known for reliability and data integrity. ACID-compliant, it supports foreign keys, joins, views, triggers and stored procedures.
About this chart
Bitnami package for PostgreSQL
PostgreSQL (Postgres) is an open source object-relational database known for reliability and data integrity. ACID-compliant, it supports foreign keys, joins, views, triggers and stored procedures.
Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.
TL;DR
helm install my-release oci://registry-1.docker.io/bitnamicharts/postgresql
Looking to use PostgreSQL in production? Try VMware Tanzu Application Catalog, the enterprise edition of Bitnami Application Catalog.
Introduction
This chart bootstraps a PostgreSQL deployment on a Kubernetes cluster using the Helm package manager.
For HA, please see this repo
Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters.
Prerequisites
- Kubernetes 1.23+
- Helm 3.8.0+
- PV provisioner support in the underlying infrastructure
Installing the Chart
To install the chart with the release name my-release:
helm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/postgresql
Note: You need to substitute the placeholders
REGISTRY_NAMEandREPOSITORY_NAMEwith a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to useREGISTRY_NAME=registry-1.docker.ioandREPOSITORY_NAME=bitnamicharts.
The command deploys PostgreSQL on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.
Tip: List all releases using
helm list
Uninstalling the Chart
To uninstall/delete the my-release deployment:
helm delete my-release
The command removes all the Kubernetes components but PVC's associated with the chart and deletes the release.
To delete the PVC's associated with my-release:
kubectl delete pvc -l release=my-release
Note: Deleting the PVC's will delete postgresql data as well. Please be cautious before doing it.
Parameters
Global parameters
| Name | Description | Value |
|---|---|---|
global.imageRegistry | Global Docker image registry | "" |
global.imagePullSecrets | Global Docker registry secret names as an array | [] |
global.storageClass | Global StorageClass for Persistent Volume(s) | "" |
global.postgresql.auth.postgresPassword | Password for the "postgres" admin user (overrides auth.postgresPassword) | "" |
global.postgresql.auth.username | Name for a custom user to create (overrides auth.username) | "" |
global.postgresql.auth.password | Password for the custom user to create (overrides auth.password) | "" |
global.postgresql.auth.database | Name for a custom database to create (overrides auth.database) | "" |
global.postgresql.auth.existingSecret | Name of existing secret to use for PostgreSQL credentials (overrides auth.existingSecret). | "" |
global.postgresql.auth.secretKeys.adminPasswordKey | Name of key in existing secret to use for PostgreSQL credentials (overrides auth.secretKeys.adminPasswordKey). Only used when global.postgresql.auth.existingSecret is set. | "" |
global.postgresql.auth.secretKeys.userPasswordKey | Name of key in existing secret to use for PostgreSQL credentials (overrides auth.secretKeys.userPasswordKey). Only used when global.postgresql.auth.existingSecret is set. | "" |
global.postgresql.auth.secretKeys.replicationPasswordKey | Name of key in existing secret to use for PostgreSQL credentials (overrides auth.secretKeys.replicationPasswordKey). Only used when global.postgresql.auth.existingSecret is set. | "" |
global.postgresql.service.ports.postgresql | PostgreSQL service port (overrides service.ports.postgresql) | "" |
Common parameters
| Name | Description | Value |
|---|---|---|
kubeVersion | Override Kubernetes version | "" |
nameOverride | String to partially override common.names.fullname template (will maintain the release name) | "" |
fullnameOverride | String to fully override common.names.fullname template | "" |
clusterDomain | Kubernetes Cluster Domain | cluster.local |
extraDeploy | Array of extra objects to deploy with the release (evaluated as a template) | [] |
commonLabels | Add labels to all the deployed resources | {} |
commonAnnotations | Add annotations to all the deployed resources | {} |
diagnosticMode.enabled | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | false |
diagnosticMode.command | Command to override all containers in the statefulset | ["sleep"] |
diagnosticMode.args | Args to override all containers in the statefulset | ["infinity"] |
PostgreSQL common parameters
| Name | Description | Value |
|---|---|---|
image.registry | PostgreSQL image registry | REGISTRY_NAME |
image.repository | PostgreSQL image repository | REPOSITORY_NAME/postgresql |
image.digest | PostgreSQL image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | "" |
image.pullPolicy | PostgreSQL image pull policy | IfNotPresent |
image.pullSecrets | Specify image pull secrets | [] |
image.debug | Specify if debug values should be set | false |
auth.enablePostgresUser | Assign a password to the "postgres" admin user. Otherwise, remote access will be blocked for this user | true |
auth.postgresPassword | Password for the "postgres" admin user. Ignored if auth.existingSecret is provided | "" |
auth.username | Name for a custom user to create | "" |
auth.password | Password for the custom user to create. Ignored if auth.existingSecret is provided | "" |
auth.database | Name for a custom database to create | "" |
auth.replicationUsername | Name of the replication user | repl_user |
auth.replicationPassword | Password for the replication user. Ignored if auth.existingSecret is provided |
Deploy postgresql with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has postgresql on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartpostgresql is pinned at v13.2.27 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply