Score:0

How to enable local image registry on OpenShift Single Node Cluster installation

gw flag

I've recently completed an installation of a Single Node Cluster using OpenShift 4 but I'm running into issues when trying to spin up some of the example container / projects they have available. I just keep getting the following error:

Error starting build: an image stream cannot be used as build output because the integrated container image registry is not configured

It doesn't seem to matter which of the template containers I choose, I always get the same error. Obviously I could be wrong here, but I'm guessing this has something to do with the local registry not being enabled or configured correctly yet? Assuming that's the case, how do I go about configuring the image registry on a Single Node Cluster?

Does anyone have any ideas?

Thanks in advance

Score:0
cn flag

"because the integrated container image registry is not configured"

Quick Solution with ephemeral storage (no storage class for persistence):

oc project openshift-image-registry
oc edit configs.imageregistry.operator.openshift.io
...
  managementState: Managed
...
...
  replica: 1
...
...
  storage:
    emptyDir: {}
oc get pods

You can then also expose the registry:

oc patch configs.imageregistry.operator.openshift.io/cluster --patch '{"spec":{"defaultRoute":true}}' --type=merge
oc get routes
Score:0
cn flag

PS I mentioned exposing the route becuase you can then log into the registry and tag/push you'r own images for deployment with:

podman login -u user -p $(oc whoami -t) --tls-verify=false default-route-openshift-image-registry.apps.yourdomain.com 
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.