Deploying images from a private container registry

    To share access to your private container images across multiple services and revisions, you create a list of Kubernetes secrets () using your registry credentials, add that imagePullSecrets to your default , and then deploy those configurations to your Knative cluster.

    You need:

    1. Create a imagePullSecrets that contains your credentials as a list of secrets:

      Where

      • is the URL to the private registry where your container images are stored.

        Examples:

        • Google Container Registry:
      • [PRIVATE_REGISTRY_EMAIL] is your email address that is associated with the private registry.

      • [PRIVATE_REGISTRY_USER] is the username that you use to access the private container registry.

    1. Add the imagePullSecrets to your default service account in the namespace.

      Note: By default, the default service account in each of the namespaces of your Knative cluster are use by your revisions unless is specified.

      Run the following command to modify your default service account, assuming you named your secrets container-registry:

    Now, all the new pods that are created in the default namespace will include your credentials and have access to your container images in the private registry.