无法使用openshift内部注册表中的图像创建新应用

无法使用openshift内部注册表中的图像创建新应用,openshift,Openshift,我有一个nginx映像,我可以将它推送到openshift内部注册表。然而,当我尝试使用来自内部注册表的图像创建应用程序时,它会给我imagepullback错误。 以下是我正在遵循的步骤 [root@artel1 ~]# docker images REPOSITORY TAG IMAGE ID CREA

我有一个nginx映像,我可以将它推送到openshift内部注册表。然而,当我尝试使用来自内部注册表的图像创建应用程序时,它会给我imagepullback错误。 以下是我正在遵循的步骤

[root@artel1 ~]# docker images
REPOSITORY                                                                      TAG                 IMAGE ID            CREATED             SIZE
docker.io/nginx                                                                 latest              231d40e811cd        4 weeks ago         126 MB

[root@artel1 ~]# docker tag 231d40e811cd docker-registry-default.router.default.svc.cluster.local/openshift/nginx

[root@artel1 ~]# docker push docker-registry-default.router.default.svc.cluster.local/openshift/nginx

[root@artel1 ~]# oc new-app --docker-image=docker-registry-default.router.default.svc.cluster.local/openshift/test-image
W1227 10:18:34.761105   33535 dockerimagelookup.go:233] Docker registry lookup failed: Get https://docker-registry-default.router.default.svc.cluster.local/v2/: x509: certificate signed by unknown authority
W1227 10:18:34.784988   33535 newapp.go:479] Could not find an image stream match for "docker-registry-default.router.default.svc.cluster.local/openshift/test-image:latest". Make sure that a Docker image with that tag is available on the node for the deployment to succeed.
--> Found Docker image 7809d84 (8 days old) from docker-registry-default.router.default.svc.cluster.local for "docker-registry-default.router.default.svc.cluster.local/openshift/test-image:latest"

    OpenShift Node 
    -------------- 
    This is a component of OpenShift and contains the software for individual nodes when using SDN.

    Tags: openshift, node

    * This image will be deployed in deployment config "test-image"
    * Ports 53/tcp, 8443/tcp will be load balanced by service "test-image"
      * Other containers can access this service through the hostname "test-image"
    * WARNING: Image "docker-registry-default.router.default.svc.cluster.local/openshift/test-image:latest" runs as the 'root' user which may not be permitted by your cluster administrator

--> Creating resources ...
    deploymentconfig.apps.openshift.io "test-image" created
    service "test-image" created
--> Success
    Application is not exposed. You can expose services to the outside world by executing one or more of the commands below:
     'oc expose svc/test-image' 
    Run 'oc status' to view your app.
事件日志

34s         47s          2         test-image-1-dzhmk.15e44d430e48ec8d    Pod                     spec.containers{test-image}   Normal    Pulling             kubelet, artel2.fyre.ibm.com   pulling image "docker-registry-default.router.default.svc.cluster.local/openshift/test-image:latest"
34s         46s          2         test-image-1-dzhmk.15e44d4318ec7f53    Pod                     spec.containers{test-image}   Warning   Failed              kubelet, artel2.fyre.ibm.com   Failed to pull image "docker-registry-default.router.default.svc.cluster.local/openshift/test-image:latest": rpc error: code = Unknown desc = Error: image openshift/test-image:latest not found
34s         46s          2         test-image-1-dzhmk.15e44d4318ed5311    Pod                     spec.containers{test-image}   Warning   Failed              kubelet, artel2.fyre.ibm.com   Error: ErrImagePull
27s         46s          7         test-image-1-dzhmk.15e44d433c24e5c9    Pod                                                   Normal    SandboxChanged      kubelet, artel2.fyre.ibm.com   Pod sandbox changed, it will be killed and re-created.
25s         43s          6         test-image-1-dzhmk.15e44d43dd6a7b57    Pod                     spec.containers{test-image}   Warning   Failed              kubelet, artel2.fyre.ibm.com   Error: ImagePullBackOff
25s         43s          6         test-image-1-dzhmk.15e44d43dd6a10d9    Pod                     spec.containers{test-image}   Normal    BackOff             kubelet, artel2.fyre.ibm.com   Back-off pulling image "docker-registry-default.router.default.svc.cluster.local/openshift/test-image:latest"
吊舱状态

[root@artel1 ~]# oc get po
NAME                  READY     STATUS             RESTARTS   AGE
test-image-1-deploy   1/1       Running            0          3m
test-image-1-dzhmk    0/1       ImagePullBackOff   0          3m

到底哪里出了问题?

看起来“docker push”还没有成功完成。它应该返回“镜像已成功推送”。
首先尝试登录到内部注册表(请参阅),然后重新检查注册表的服务主机名或使用服务ip

为什么不使用ImageStream?通常,您只需运行
ocnewapp--image stream=mysql
。像这样指定内部注册表的FQDN可能就是它不起作用的原因。@WillGordon。如果图像出现在内部注册表中而不是节点上,并且要求我从该图像创建应用程序,会发生什么情况?我要先拉图像吗?由于项目中没有对应映像的imagestream,pod部署失败。我有点困惑。