0

I want to use rhel8/redis-5 image. I have the RedHat service account, the registry token in OpenShift secret format. These are steps I am following to use the image.

oc create -f secret.yaml
oc import-image rhel8/redis-5 --from=registry.redhat.io/rhel8/redis-5 --confirm
oc new-app -i redis-5

The last step (new-app) keeps failing with a Unauthorized 401 error. This is the event seen in the container that is to be spun up as a result of new-app.

Failed to pull image "registry.redhat.io/rhel8/redis-5@sha256:361f32130a48861ff41783b38f328fde0df14b44c50ae12a212947285c6710c2": rpc error: code = Unknown desc = unable to retrieve auth token: 401 unauthorized

I am not sure, how I should provide the image pull secret, if at all. Can you please help me get the image running?

cogitoergosum
  • 2,309
  • 4
  • 38
  • 62
  • Looks like the `oc new-app -i redis-5` is trying pull the image into the registry again. You should use the image that was just imported. – Chris Bolton Oct 22 '19 at 01:12
  • The `redis-5` image is visible in `oc get is`. Hence, the `new-app redis-5`. How do we use the image that was just imported? BTW, as per the help text of `import-image`, only meta data is imported. – cogitoergosum Oct 22 '19 at 07:04
  • @Rinor how do we do that? I didn't follow. Also, please note that, I am facing the same issue with web console too. – cogitoergosum Oct 22 '19 at 12:47
  • Sorry, I didn't check the full url and assumed the problem is with the local registry. – Rinor Oct 22 '19 at 13:00

0 Answers0