Use a private image repository

This document explains how to configure Apigee hybrid to use images from a private container image repository.

Overview

All Apigee hybrid runtime images are hosted in the Google Cloud Container Registry (GCR). If for any reason you wish to employ a private image container repository, you can download the images from GCR, push them to your private repository, and override the default image locations in your overrides.yaml file.

Configuration steps

Follow these steps to use a private image container repository for the Apigee hybrid images. To perform these steps and successfully use the images in your private repository, you must be familiar with the Apigee hybrid installation procedure. In a typical scenario, you would plan to configure the private repository as part of a fresh hybrid installation.

  1. Push the Apigee hybrid images from GCR to your private repository. We recommend that you use the apigee-push-pull utility to accomplish this step.

    If you prefer to do this step manually, you need to have Docker installed and use the docker pull command as follows. Be sure to append the correct tag to each image name. For example, the tag for apigee-synchronizer is 1.9.4, as shown below.

    Here are the images for the apigee-system and apigee namespaces:

    Namespace: apigee-system

    docker pull gcr.io/apigee-release/hybrid/apigee-installer:1.9.4
    docker pull gcr.io/apigee-release/hybrid/apigee-kube-rbac-proxy:v0.14.0
    docker pull gcr.io/apigee-release/hybrid/apigee-operators:1.9.4
    

    Namespace: apigee

    docker pull gcr.io/apigee-release/hybrid/apigee-cassandra-backup-utility:1.9.4
    docker pull gcr.io/apigee-release/hybrid/apigee-connect-agent:1.9.4
    docker pull gcr.io/apigee-release/hybrid/apigee-diagnostics-collector:1.9.4
    docker pull gcr.io/apigee-release/hybrid/apigee-envoy:v1.25.1
    docker pull gcr.io/apigee-release/hybrid/apigee-fluent-bit:2.1.3
    docker pull gcr.io/apigee-release/hybrid/apigee-hybrid-cassandra-client:1.9.4
    docker pull gcr.io/apigee-release/hybrid/apigee-hybrid-cassandra:1.9.4
    docker pull gcr.io/apigee-release/hybrid/apigee-mart-server:1.9.4
    docker pull gcr.io/apigee-release/hybrid/apigee-mint-task-scheduler:1.9.4
    docker pull gcr.io/apigee-release/hybrid/apigee-prom-prometheus:v2.39.1
    docker pull gcr.io/apigee-release/hybrid/apigee-prometheus-adapter:v0.10.0
    docker pull gcr.io/apigee-release/hybrid/apigee-redis:1.9.4
    docker pull gcr.io/apigee-release/hybrid/apigee-runtime:1.9.4
    docker pull gcr.io/apigee-release/hybrid/apigee-stackdriver-logging-agent:1.9.12-2
    docker pull gcr.io/apigee-release/hybrid/apigee-stackdriver-prometheus-sidecar:0.9.0
    docker pull gcr.io/apigee-release/hybrid/apigee-synchronizer:1.9.4
    docker pull gcr.io/apigee-release/hybrid/apigee-udca:1.9.4
    docker pull gcr.io/apigee-release/hybrid/apigee-watcher:1.9.4
    docker pull gcr.io/apigee-release/hybrid/apigee-asm-ingress:1.17.2-asm.8-distroless
    docker pull gcr.io/apigee-release/hybrid/apigee-asm-istiod:1.17.2-asm.8-distroless
    

    After you pull and tag the images, you must push them to your private repository. See docker push.

  2. Create a Kubernetes Secret in the apigee and apigee-system namespaces.

    If these namespaces do not exist in your cluster, you must create them before performing this step.

    For steps to create the Secret, see Create a Secret by providing credentials on the command line. For example, to create a secret in the apigee-system namespace:

    kubectl create secret docker-registry SECRET_NAME -n apigee-system \
      --docker-server=YOUR_REGISTRY_SERVER \
      --docker-username=YOUR_DOCKER_USERNAME \
      --docker-email=YOUR_DOCKER_EMAIL \
      --docker-password="YOUR_DOCKER_PASSWORD)"

    To create a Secret in the apigee namespace:

    kubectl create secret docker-registry SECRET_NAME -n apigee \
      --docker-server=YOUR_REGISTRY_SERVER \
      --docker-username=YOUR_DOCKER_USERNAME \
      --docker-email=YOUR_DOCKER_EMAIL \
      --docker-password="YOUR_DOCKER_PASSWORD)"
  3. Add the Secret to your overrides.yaml file. Creation of the overrides file is described in the hybrid installation steps. See Configure the cluster for details.
    imagePullSecrets:
      - name: SECRET_NAME
  4. Update your overrides.yaml file with image URLs for the images stored in your private repository. Each component that is stored in the repository has an image:url element. Use this element to specify the URL of each component image. For example:
    mart:
      serviceAccountPath: /installdir/hybrid-files/service-accounts/hybrid-apigee-non-prod.json
      image:
        url: my-docker.pkg.dev/hybrid-1/registry-name/apigee-mart-server

    Follow this pattern to update each top-level hybrid component in your overrides.yaml file with its private repository image URL. A complete example overrides file is provided with your hybrid installation in $APIGEECTL_HOME/examples/private-overrides.yaml directory.

You can now complete a new hybrid installation using the private images, or update your existing installation. See the Apigee hybrid installation steps for more information.

Installing cert-manager from a private repository

To install cert-manager from your private repository, see Installing with Helm. It is important that you install the same version of cert-manager as specified in the Apigee hybrid installation instructions to ensure compatibility.