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
Expose the registry service
oc create route reencrypt --service=image-registry -n openshift-image-registry
Annotate the route
oc annotate route image-registry haproxy.router.openshift.io/balance=source -n openshift-image-registry
Get the route host name
HOST=$(oc get route image-registry -n openshift-image-registry --template='{{ .spec.host }}')
Log into the image registry
podman login -u $(oc whoami) -p $(oc whoami -t) $HOST
Test it out
podman pull openshift/hello-openshift
podman images
expected output
openshift/hello-openshift latest 7af3297a3fb4 4 years ago 6.09MB