EDB private container registry v1.27.1

The images for the EDB Postgres® AI for CloudNativePG™ Cluster operator, as well as various operands, are kept in a private container image registry under docker.enterprisedb.com.

Important

Access to the private registry requires an account with EDB and is reserved to EDB customers with a valid subscription plan. Credentials will be funneled through your EDB account.

Important

There is a bandwidth quota of 10GB/month per registry.

Note

When installing the operator and operands from the private registry, the license keys are not needed.

Repository information

Collect the following information:

  1. Your EDB account token
  2. The name of the repository, which will be k8s
  3. The repository server, which will be docker.enterprisedb.com

For clarity, the following examples assume your token is in an environment variable named EDB_SUBSCRIPTION_TOKEN.

Example with docker login

You can log in via Docker from your terminal. In this context,

  • The server is docker.enterprisedb.com
  • The username is the repository, k8s
  • The password is your EDB account token (stored in $EDB_SUBSCRIPTION_TOKEN)
docker login docker.enterprisedb.com  \
  --username k8s \
  --password "$EDB_SUBSCRIPTION_TOKEN"  
Output
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Login Succeeded

Operand images

EDB Postgres® AI for CloudNativePG™ Cluster supports various PostgreSQL distributions that have images available from the same private registry:

  • Community PostgreSQL
  • EDB Postgres Advanced (EPAS)
  • EDB Postgres Extended (PGE)

These images follow the requirements and the conventions described in the "Container image requirements" page of the EDB Postgres® AI for CloudNativePG™ Cluster documentation.

In the table below you can find the image name prefix for each Postgres distribution:

Postgres distributionImage name
Community PostgreSQLpostgresql
EDB Postgres Extended (PGE)edb-postgres-extended
EDB Postgres Advanced (EPAS)edb-postgres-advanced

How to deploy clusters with EPAS or PGE operands

If you have already installed the EDB Postgres® AI for CloudNativePG™ Cluster operator from the private registry, you must have already set up an image pull secret. If you haven't, the next section may be of interest to you.

If you have an existing installation of the operator, in order to pull images for EPAS or PGE from the private registry, you will need to create a kubernetes.io/dockerconfigjson pull secret.

You can create a pull secret from credentials.

kubectl create secret docker-registry registry-pullsecret \
  -n <CLUSTER-NAMESPACE> --docker-server=docker.enterprisedb.com \
  --docker-username=k8s \
  --docker-password="$EDB_SUBSCRIPTION_TOKEN"

As mentioned above, the docker-username is the name of your registry, i.e. k8s. The docker-password is the token retrieved from the EDB portal.

Once your pull secret is created, remember to set the imagePullSecrets field in the cluster manifest in addition to the imageName. The manifest below will create a cluster running PG Extended.

apiVersion: postgresql.k8s.enterprisedb.io/v1
kind: Cluster
metadata:
  name: postgresql-extended-cluster
spec:
  instances: 3
  imageName: docker.enterprisedb.com/k8s/edb-postgres-extended:16.2
  imagePullSecrets:
  - name: registry-pullsecret

  storage:
    storageClass: standard
    size: 1Gi

How to install the operator using the EDB private registry

As mentioned above, the username for docker is the name of your repository, and the token is the password. The same credentials can be used for kubernetes to access the registry by setting up a kubernetes.io/dockerconfigjson pull secret.

As mentioned in the installation document, there are several different ways to install the operator.

If you are going to install using images from the private registry, you will need to create a pull secret, as we have mentioned, and also customize the OPERATOR_IMAGE_NAME parameter in the deployment manifest.

We suggest to use the Helm chart for installation, which will take care of creating the pull secret and customizing the operator image repository for you.

You can find more information in the Helm chart page.

As an example, the following command (provided the token) will install the PG4K operator when using the repository from the EDB EnterpriseDB Plan:

helm upgrade --install edb-pg4k \
  --namespace postgresql-operator-system \
  --create-namespace \
  --set image.repository=docker.enterprisedb.com/k8s/edb-postgres-for-kubernetes \
  --set image.imageCredentials.username=k8s \
  --set image.imageCredentials.password="$EDB_SUBSCRIPTION_TOKEN" \
  --set image.imageCredentials.create=true \
  --set "imagePullSecrets[0].name"=postgresql-operator-pull-secret \
  --set config.data.PULL_SECRET_NAME=postgresql-operator-pull-secret \
  edb/edb-postgres-for-kubernetes