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:

    • The credentials to the private container registry where your container images are stored.
    1. Create a imagePullSecrets that contains your credentials as a list of secrets:

      Where

      • [REGISTRY-CRED-SECRETS] is the name that you want for your secrets (imagePullSecrets object). For example, container-registry.

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

      • [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.

      • [PRIVATE_REGISTRY_PASSWORD] is the password that you use to access the private container registry.

      Example:

      Tip: After creating the imagePullSecrets, you can view those secret’s by running:

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

    You can now create a service that uses your container images from the private registry. .

    Was this page helpful?

    Glad to hear it! Please tell us how we can improve.

    Sorry to hear that. Please .