Unable to install docker registry on Openshift

Solution Verified - Updated -

Issue

  • When installing docker registry below error is seen:
error: can't check for existing docker-registry "docker-registry": Get https://x.y.z:8443/api/v1/namespaces/default/services/docker-registry: Forbidden
  • oc get pods show below output
oc get pods
NAME                      READY     REASON                                                                                                                                                                                                                                                                         RESTARTS   AGE
docker-registry-1-dtk0f   0/1       image pull failed for registry.access.redhat.com/openshift3_beta/ose-docker-registry:v3.0.0.0, this may be because there are no credentials on this request.  details: (Tag v3.0.0.0 not found in repository registry.access.redhat.com/openshift3_beta/ose-docker-registry)   0          45s
  • Deploying the Registry issue
  • Getting below error when deploying the registry :
oc logs docker-registry-1-deploy
E0707 17:12:44.306230       1 clientcmd.go:128] Error reading BEARER_TOKEN_FILE "/var/run/secrets/kubernetes.io/serviceaccount/token": open /var/run/secrets/kubernetes.io/serviceaccount/token: permission denied
E0707 17:12:44.311209       1 clientcmd.go:146] Error reading BEARER_TOKEN_FILE "/var/run/secrets/kubernetes.io/serviceaccount/token": open /var/run/secrets/kubernetes.io/serviceaccount/token: permission denied
F0707 17:12:44.331943       1 deployer.go:63] couldn't get deployment default/docker-registry-1: User "system:anonymous" cannot get replicationcontrollers in project "default"

Environment

  • Openshift Enterprise
    • 3.x

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