Helm charts to install the following Operators:
-
EDB Postgres for Kubernetes operator (PG4K), designed by EnterpriseDB to manage PostgreSQL workloads on any supported Kubernetes cluster running in private, public, or hybrid cloud environments. Derived from CloudNativePG's Helm chart.
-
EDB Postgres for Kubernetes operator for LTS version 1.28 (PG4K LTS v1.28), designed by EnterpriseDB to manage PostgreSQL workloads on any supported Kubernetes cluster running in private, public, or hybrid cloud environments. Derived from CloudNativePG's Helm chart.
-
EDB CloudNativePG Global Cluster (PG4K-PGD version 2.x), designed by EnterpriseDB to manage EDB Postgres Distributed v6 workloads on Kubernetes
-
EDB Postgres Distributed for Kubernetes (PG4K-PGD) version 1.x, designed by EnterpriseDB to manage EDB Postgres Distributed v5 workloads on Kubernetes, with traffic routed by PGD Proxy.
| Chart | Operator | Operand | Description |
|---|---|---|---|
edb-postgres-for-kubernetes |
PG4K | EDB Postgres | Single-cluster PostgreSQL |
edb-postgres-for-kubernetes-lts-1-28 |
PG4K LTS v1.28 | EDB Postgres | Single-cluster PostgreSQL |
edb-postgres-distributed-for-kubernetes |
PG4K-PGD 1.x | PGD 5 + PGD Proxy | Multi-region distributed PostgreSQL |
edb-cloudnativepg-global-cluster |
PG4K-PGD 2.x | PGD 6 | Multi-region distributed PostgreSQL |
Before deploying the charts, add the following repository by running:
helm repo add edb https://enterprisedb.github.io/edb-postgres-for-kubernetes-charts/You can then run helm search repo edb to see the all the available charts.
Both the operator and the operand images required by PG4K are
pulled from the docker.enterprisedb.com/k8s repository,
access to these images requires an active EDB subscription.
See: obtaining an EDB subscription token
For example, to deploy the operator:
helm upgrade --install edb-pg4k \
--namespace postgresql-operator-system \
--create-namespace \
--set image.imageCredentials.password=<THE-TOKEN> \
edb/edb-postgres-for-kubernetesThis will create a deployment in the postgresql-operator-system namespace.
You can check it's ready:
$ kubectl get deployments -n postgresql-operator-system
NAME READY UP-TO-DATE AVAILABLE AGE
edb-pg4k-edb-postgres-for-kubernetes 1/1 1 1 11sOnce it is ready, you can verify that you can deploy the sample cluster suggested by the helm chart.
It is possible to limit the operator's capabilities to solely the namespace in which it has been installed. With this restriction, the cluster-level permissions required by the operator will be substantially reduced, and the security profile of the installation will be enhanced.
You can install the operator in single-namespace mode by setting the
config.clusterWide flag to false, as in the following example:
helm upgrade --install edb-pg4k \
--namespace postgresql-operator-system \
--create-namespace \
--set config.clusterWide=false \
--set image.imageCredentials.password=<THE-TOKEN> \
edb/edb-postgres-for-kubernetesIMPORTANT: the single-namespace installation mode can't coexist with the cluster-wide operator. Otherwise there would be collisions when managing the resources in the namespace watched by the single-namespace operator. It is up to the user to ensure there is no collision between operators.
The PG4K-PGD operator helm chart 1.x and 2.x are designed to manage different versions of PGD, and they can't be installed together in the same cluster. The main difference between the two charts are:
- PG4K-PGD 1.x chart supports PGD Proxy image, which PG4K-PGD 2.x chart does not support.
- Chart name difference
- 1.x:
edb-postgres-distributed-for-kubernetes - 2.x:
edb-cloudnativepg-global-cluster
- 1.x:
The PG4K-PGD operator chart installs both the PG4K-PGD and PG4K operators in the same namespace. The PG4K operator is installed as a dependency, using the PG4K operator LTS helm chart.
The chart also installs the cert-manager operator as a dependency. You can avoid this if necessary. See the sub-section on deploying individually.
Similar to the PG4K helm chart installation, both the operator and the operand images
are pulled from the docker.enterprisedb.com/k8s repository,
access to these images requires an active EDB subscription. See: obtaining an EDB subscription token
The edb-cloudnativepg-global-cluster chart deploys the PG4K-PGD 2.x operator
for managing EDB Postgres Distributed v6 workloads.
For example, to deploy the operator:
helm upgrade --dependency-update \
--install edb-pg4k-pgd \
--namespace pgd-operator-system \
--create-namespace \
--set image.imageCredentials.password=<THE-TOKEN> \
edb/edb-cloudnativepg-global-clusterOnce the above runs, a new namespace pgd-operator-system will be
created, with several deployments, including the two operators.
$ kubectl get deployments -n pgd-operator-system
NAME READY UP-TO-DATE AVAILABLE AGE
edb-pg4k-pgd-cert-manager 1/1 1 1 7m46s
edb-pg4k-pgd-cert-manager-cainjector 1/1 1 1 7m46s
edb-pg4k-pgd-cert-manager-webhook 1/1 1 1 7m46s
edb-pg4k-pgd-cloudnativepg-global-cluster 1/1 1 1 7m46s
edb-pg4k-pgd-postgres-for-kubernetes-lts-1-28 1/1 1 1 7m46sWhen the deployments are ready, you can verify that the steps suggested by the helm chart are working:
- set up a cert-manager issuer
- deploy an example 3-region PGD cluster
By default, the Helm chart-installed operator adds a default PGD image
name to the configuration file. PGD groups created without spec.imageName
will use that default. You can customize the default
by setting it in the Helm values.
pgdImageName: the default PGD image name to be used by the operator.
This example changes the default PGD image:
helm upgrade --dependency-update \
--install edb-pg4k-pgd \
--namespace pgd-operator-system \
--create-namespace \
--set image.imageCredentials.password=<THE-TOKEN> \
--set global.pgdImageName=postgresql-pgd:18.3-pgd631-expanded-ubi9 \
edb/edb-cloudnativepg-global-clusterNote: You can find the latest released image catalogs for operand from PGD Operand images
The installation of the PG4K-PGD 1.x is similar to the PG4K-PGD 2.x, but with a different chart name and image names.
For example, to deploy the PG4K-PGD 1.x operator chart:
helm upgrade --dependency-update \
--install edb-pg4k-pgd \
--namespace pgd-operator-system \
--create-namespace \
--set image.imageCredentials.password=<THE-TOKEN> \
edb/edb-postgres-distributed-for-kubernetesOnce the above runs, a new namespace pgd-operator-system will be
created, with several deployments, including the two operators.
$ kubectl get deployments -n pgd-operator-system
NAME READY UP-TO-DATE AVAILABLE AGE
edb-pg4k-pgd-cert-manager 1/1 1 1 7m46s
edb-pg4k-pgd-cert-manager-cainjector 1/1 1 1 7m46s
edb-pg4k-pgd-cert-manager-webhook 1/1 1 1 7m46s
edb-pg4k-pgd-edb-postgres-distributed-for-kubernetes 1/1 1 1 7m46s
edb-pg4k-pgd-edb-postgres-for-kubernetes-lts-1-28 1/1 1 1 7m46sWe can customize default PGD and PGD proxy image names by setting the following values in the Helm chart.
PGD groups created without spec.imageName and spec.pgdProxy.imageName will use those defaults.
pgdImageName: the default PGD image name to be used by the operator.proxyImageName: the default PGD proxy image name to be used by the operator (only supported in PG4K-PGD 1.x).
This example changes the default PGD and PGD proxy image:
helm upgrade --dependency-update \
--install edb-pg4k-pgd \
--namespace pgd-operator-system \
--create-namespace \
--set image.imageCredentials.password=<THE-TOKEN> \
--set global.pgdImageName=edb-postgres-advanced-pgd:17.9-pgd593-ubi9 \
--set global.proxyImageName=edb-pgd-proxy:5.9.3-ubi9 \
edb/edb-postgres-distributed-for-kubernetesNote: You can find the latest released image catalogs for operand from PGD Operand images
When installing in the air-gapped environment, you can customize the image repository by setting
the global.repository values in the Helm chart. Once this value is set, the PG4K-PGD operator image,
PGD operand image, and PGD Proxy operand image will all be pulled from the specified repository.
You can also customize the image repository for PG4K operator by setting the
edb-postgres-for-kubernetes-lts.image.repository value in the Helm chart.
helm upgrade --install edb-pg4k-pgd \
--namespace pgd-operator-system \
--create-namespace \
--set global.repository=another_registry \
--set edb-postgres-for-kubernetes-lts.image.repository=another_registry/edb-postgres-for-cloudnativepg \
--set image.imageCredentials.password=<THE-TOKEN> \
--set cert-manager.enabled=false \
charts/edb-postgres-distributed-for-kubernetesNote: When customizing for air-gapped environments, ensure both repositories share the same base registry:
global.repositoryis used to set the repository forPG4K-PGD operator image,PGD operand image, andPGD Proxy operand image. You need to use the name of the repository only, without the image name. The default value isdocker.enterprisedb.com/k8s.edb-postgres-for-kubernetes-lts.image.repositoryis used to set the repository forPG4K operator image. You need to use the full path including the image name (e.g.,another_registry/edb-postgres-for-cloudnativepg). The default value isdocker.enterprisedb.com/k8s/edb-postgres-for-cloudnativepg.
The PG4K operator repository must be set separately because the subchart doesn't automatically inherit from global.repository.
The helm chart edb-postgres-distributed-for-kubernetes and edb-cloudnativepg-global-cluster is
not backward compatible, and they can't be installed together in the same cluster. If you have an
existing edb-postgres-distributed-for-kubernetes chart managing the PGD v5.x workloads,
and want to migrate to PGD v6.x workloads, you need uninstall the edb-postgres-distributed-for-kubernetes chart
and then install the edb-cloudnativepg-global-cluster chart first.
Before migration, you need to make sure the edb-postgres-distributed-for-kubernetes chart is v1.2.0 or above, and PGD
operand image is 5.9.1 or above.
Note: You can find more information of the migration in the migration guide.
The PG4K-PGD charts are set by default to also install the cert-manager operator, which they depend on. When following this route, all operators will be installed in the same namespace. This is in contrast with other installation paths, where we may want the two operators reside in dedicated namespaces.
Installing all dependencies in the same namespace is a design limitation of
Helm, but we can get around it by installing dependencies with separate
invocations of helm.
If you would like to install the cert-manager in a separate namespace, please follow the steps below.
- Setup cert-manager
EDB Postgres Distributed for Kubernetes requires Cert Manager 1.10 or higher.
Note: In case a supported version of the cert-manager operator is already deployed in your K8S setup, you can skip this section and go directly to the operator setup.
To deploy cert-manager in its own namespace
$ helm repo add jetstack https://charts.jetstack.io &&
helm upgrade --install cert-manager jetstack/cert-manager \
--create-namespace \
--namespace cert-manager \
--version "v1.16.1" \
--set installCRDs=true \
--wait- Setup the PG4K-PGD operator
Once the above deployments are ready, you can deploy the PG4K-PGD
helm chart taking care to set cert-manager.enabled to false.
For example, deploy chart edb-cloudnativepg-global-cluster for PG4K-PGD 2.x operator
without installing cert-manager:
helm upgrade --dependency-update \
--install edb-pg4k-pgd \
--namespace pgd-operator-system \
--create-namespace \
--set image.imageCredentials.password=<THE-TOKEN> \
--set cert-manager.enabled=false \
edb/edb-cloudnativepg-global-clusterYou should now have a separate namespace for each operator:
$ kubectl get ns
NAME STATUS AGE
…
cert-manager Active 24m
pgd-operator-system Active 55sIf you have existing Helm deployments using the previous separate repositories
(k8s_enterprise, k8s_standard, k8s_enterprise_pgd, k8s_standard_pgd),
you need to migrate them to the new unified docker.enterprisedb.com/k8s repository.
For EDB Postgres for Kubernetes (PG4K) releases:
helm upgrade --reuse-values \
--set image.repository=docker.enterprisedb.com/k8s/edb-postgres-for-cloudnativepg \
--set image.imageCredentials.username=k8s \
edb-pg4k \
edb/edb-postgres-for-kubernetesFor EDB Postgres Distributed for Kubernetes (PG4K-PGD 1.x) releases:
helm upgrade --reuse-values \
--set global.repository=docker.enterprisedb.com/k8s \
--set image.imageCredentials.username=k8s \
edb-pg4k-pgd \
edb/edb-postgres-distributed-for-kubernetesFor more details, see the official migration guide.
To deploy an operator from source, first clone the current repository locally and then run the following command: (Example for EDB-PG4K)
helm upgrade --install edb-pg4k \
--namespace postgresql-operator-system \
--create-namespace \
charts/edb-postgres-for-kubernetesNavigate to the repository root and run the following command to deploy the operator from source:
for PG4K-PGD v2.x
helm upgrade --install edb-pg4k-pgd \
--namespace pgd-operator-system \
--create-namespace \
--set image.imageCredentials.password=<THE-TOKEN> \
charts/edb-cloudnativepg-global-clusteror for PG4K-PGD v1.x
helm upgrade --install edb-pg4k-pgd \
--namespace pgd-operator-system \
--create-namespace \
--set image.imageCredentials.password=<THE-TOKEN> \
charts/edb-postgres-distributed-for-kubernetesIf you update the version of the dependency charts and want to install from
source, remember to run helm dependency update and helm dependency build in
the chart directory before installing from the source: (for PG4K-PGD v2.x)
helm dependency update charts/edb-cloudnativepg-global-cluster
helm dependency build charts/edb-cloudnativepg-global-clusteredb-postgres-for-kubernetes-charts is distributed under Apache License 2.0.
IMPORTANT: Both the operators and the operand images are distributed
under different license terms, in particular the EDB Postgres for Kubernetes operator
and the EDB Postgres Distributed for Kubernetes operator
are distributed under the
EnterpriseDB End User License Agreement.
Copyright (C) 2021 EnterpriseDB Corporation.