-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Description
I want to deploy a docker image which I have pushed to hub.docker.com
but whenever I import the private registry as image stream I get an unauthenticated error although I have created a docker secret within openshift (related docs).
Version
oc v3.7.1+ab0f056
kubernetes v1.7.6+a08f5eeb62
features: Basic-Auth
Server https://api.starter-us-west-2.openshift.com:443
openshift v3.7.23
kubernetes v1.7.6+a08f5eeb62
Steps To Reproduce
- Create a secret to be authorized for the private docker registry (not sure if the
docker-server
parameter is correct, official openshift docs are very unclear about that)
oc secrets new-dockercfg pull-secret \
--docker-server=docker.io \
--docker-username=MY_USER \
--docker-password=MY_PASSWORD \
--docker-email=unused
- Use secret for pull
oc secrets link default pull-secret --for=pull
- Try to import from the private docker registry
oc import-image my-private-registry --from=docker.io/feedme/learning-openshift --confirm
Current Result
The import completed with errors.
Name: my-private-registry
Namespace: test-namespace
Created: Less than a second ago
Labels: <none>
Annotations: openshift.io/image.dockerRepositoryCheck=2018-02-05T19:21:46Z
Docker Pull Spec: 172.30.254.23:5000/test-namespace/my-private-registry
Image Lookup: local=false
Unique Images: 0
Tags: 1
latest
tagged from docker.io/feedme/learning-openshift
! error: Import failed (Unauthorized): you may not have access to the Docker image "docker.io/feedme/learning-openshift:latest"
Less than a second ago
error: tag latest failed: you may not have access to the Docker image "docker.io/feedme/learning-openshift:latest"
Expected Result
I expect the registry to be imported so that I can later on create an app.