Cloud Experts Documentation

Accessing the Internal Registry from ARO

This content is authored by Red Hat experts, but has not yet been tested on every supported configuration.

Kevin Collins

06/28/2022

One of the advantages of using OpenShift is the internal registry that comes with OpenShfit to build, deploy and manage container images locally. By default, access to the registry is limited to the cluster ( by design ) but can be extended to usage outside of the cluster. This guide will go through the steps required to access the OpenShift Registry on an ARO cluster outside of the cluster.

Prerequisites

  • an ARO Cluster
  • oc cli
  • podman or docker cli

Expose the Registry

  1. Expose the registry service

    oc patch config.imageregistry.operator.openshift.io/cluster --patch='{"spec":{"defaultRoute":true}}' --type=merge
    oc patch config.imageregistry.operator.openshift.io/cluster --patch='[{"op": "add", "path": "/spec/disableRedirect", "value": true}]' --type=json
    
  2. Get the route host name

    HOST=$(oc get route default-route -n openshift-image-registry --template='{{ .spec.host }}')
    
  3. Log into the image registry

    podman login -u $(oc whoami) -p $(oc whoami -t) $HOST
    

Test it out

podman pull $HOST/openshift/cli

podman images

Expected output:

default-route-openshift-image-registry.apps.<domain>/openshift/cli                latest      aa85757767cb  3 weeks ago    615 MB

Interested in contributing to these docs?

Collaboration drives progress. Help improve our documentation The Red Hat Way.

Red Hat logo LinkedIn YouTube Facebook Twitter

Products

Tools

Try, buy & sell

Communicate

About Red Hat

We’re the world’s leading provider of enterprise open source solutions—including Linux, cloud, container, and Kubernetes. We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Subscribe to our newsletter, Red Hat Shares

Sign up now
© 2023 Red Hat, Inc.