ImageStreams and Pods fail to pull images when Dev Portal generated secret is added in the namespace

Solution Verified - Updated -

Issue

Image streams are not able to pull images from registry.redhat.io (I think not even from other external repos), following these steps:

(1) Generate a token in the Registry Service Accounts app, and download it as an OpenShift secret YAML file (7457766-pull-secret.yml in my case).

(2) Log into Developer Sandbox, and initialize the downloaded secret:

oc create -f 7457766-pull-secret.yml
# create image stream
$ oc replace --force -f https://raw.githubusercontent.com/jboss-container-images/jboss-eap-openshift-templates/eap74/eap74-openjdk11-image-stream.json
# inspect the created image stream
$ oc describe is jboss-eap74-openjdk11-openshift
...
  ! error: Import failed (InternalError): Internal error occurred: registry.redhat.io/jboss-eap-7/eap74-openjdk11-openshift-rhel8:latest: illegal base64 data at input byte 20
      6 seconds ago
...

Also, I'm not able to build images anymore:

$ oc new-build -D $'FROM centos:7\nRUN yum install -y httpd'
W1114 09:48:18.273102   33679 dockerimagelookup.go:297] container image remote registry lookup failed: docker.io/library/centos:7: illegal base64 data at input byte 20
error: unable to locate any images in image streams, local docker images with name "centos:7"

(3) Link the created secret with the "default" service account:

oc secrets link default 7457766-thofman-pull-secret --for=pull

Pods are not able to pull images from registty.redhat.io:

# start a rollout on some deployment config (or just try to create some new pod)
$ oc rollout latest eap7-app-dc
# inspect the newly created pod
$ oc describe pod eap8-app-7f4d9f6b59-nwjtw
...
Events:
  Warning  Failed          4m54s (x4 over 6m26s)  kubelet            Failed to pull image "image-registry.openshift-image-registry.svc:5000/thofman-dev/eap8-app@sha256:7944a8c0c12f64b7ccbdb82023b5682736ecee76cba1c8081911d57f8fdfcd23": illegal base64 data at input byte 20
...

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
  • Red Hat OpenShift

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content