Import images and image streams from private registries

To securely manage content from external sources, configure your image streams to import tag and image metadata from private registries requiring authentication. This procedure is essential if you change the registry that the Cluster Samples Operator uses for pulling content to something other than the default registry.redhat.io.

Note

When importing from insecure or secure registries, the registry URL defined in the secret must include the :80 port suffix or the secret is not used when attempting to import from the registry.

Procedure
  1. You must create a secret object that is used to store your credentials by entering the following command:

    $ oc create secret generic <secret_name> --from-file=.dockerconfigjson=<file_absolute_path> --type=kubernetes.io/dockerconfigjson
  2. After the secret is configured, create the new image stream or enter the oc import-image command:

    $ oc import-image <imagestreamtag> --from=<image> --confirm

    During the import process, Red Hat OpenShift Container Platform picks up the secrets and provides them to the remote party.