Bug 1629021 - Image cannot be pulled from private docker hub registry
Summary: Image cannot be pulled from private docker hub registry
Keywords:
Status: CLOSED DUPLICATE of bug 1561989
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: openshift-controller-manager
Version: 3.9.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Michal Fojtik
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-09-14 16:28 UTC by Adam Kirk
Modified: 2018-09-17 10:30 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-09-17 10:30:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Adam Kirk 2018-09-14 16:28:08 UTC
Description of problem:

Images cannot be pulled from private docker hub registry. I have tried the following steps using a private gitlab registry without issue...it seems to only affect docker hub.

I have tested all credentials manually by using docker login and docker pull for the same image, so I'm confident it's not a permissions problem.

Version-Release number of selected component (if applicable):

OpenShift Master: v3.9.31
Kubernetes Master: v1.9.1+a0ce1bc657
OpenShift Web Console: v3.9.31

How reproducible:

Seems consistent, with docker hub.

Steps to Reproduce:

Run the following commands to create a secret:

```
$ oc create secret docker-registry dockerhubsecret \
    --docker-server=docker.io \
    --docker-username=***** \
    --docker-password="******" \
    --docker-email=*****
$ oc secrets link default dockerhubsecret --for=pull
```

Then run oc apply -f ./some.yaml 

```some.yaml
apiVersion: v1
kind: DeploymentConfig
metadata:
  annotations:
    description: test-private-image
  name: test-private-image
spec:
  replicas: 1
  selector:
    name: test-private-image
  template:
    metadata:
      labels:
        name: test-private-image
      name: test-private-image
    spec:
      imagePullSecrets:
      - name: dockerhubsecret
      containers:
      - image: docker.io/private/app:latest
        command:
        - "/bin/sh"
        - "-c"
        - "while true; do echo 'running'; sleep 1; done"
        name: test-private-image
```



Actual results:

The pod will not initialize and gives the following error:

'Failed to pull image "private/app:latest": rpc error: code = Unknown desc = repository private/app:latest not found: does not exist or no pull access'

Expected results:

The image should be pulled and the pod should initialize.

Comment 1 Maciej Szulik 2018-09-17 10:30:03 UTC
Closing as a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1561989

*** This bug has been marked as a duplicate of bug 1561989 ***


Note You need to log in before you can comment on or make changes to this bug.