How to pull new docker images to openshift cluster nodes from remote private registry?

All steps specified in https://blog.openshift.com/remotely-push-pull-container-images-openshift/ (and other sources) worked perfectly on master, but it does not help me to pull from nodes.

Details:

  • Exporting data from MySQL docker image
  • Named Docker volume to share build not updating
  • Difference between Docker for AWS and Docker Cloud?
  • Installing openssh-server, g++, gdb, and gdbserver in a docker container | Visual C++ for Linux Development + Docker
  • OpenSSL error on Tornado server
  • docker getaddrinfo ENOTFOUND mysql
    1. Logged in on master and two nodes to registry: docker login
      https://my.registry:5000

    2. Created new secret on master with: oc secrets new my.registry
      .dockerconfigjson=/root/.docker/config.json
      (can’t do the same on
      nodes, because they do not have oc utility)

    3. In my current project added secret for default account: oc secrets
      add serviceaccount/default secrets/my.registry –for=pull

    Now when I’m naking a new deployment, the pods created on master will start perfectly well (master will be able to pull needed images), but pods on nodes will fail to start unless I manually pull images on them with docker pull.

    So how can I make all nodes from my openshift (origin) cluster pull images with specified default account?

  • Running nano in docker container
  • How can share Docker Volume UID with my host macOSx
  • tinyproxy not tracing xmlhttprequest
  • Postgres Docker - unable to connect from remote server
  • What is for parser directive in docker
  • logout/login from inside Vagrantfile
  • 2 Solutions collect form web for “How to pull new docker images to openshift cluster nodes from remote private registry?”

    I believe the command may have changed somewhat with recent versions of origin. The following works for me:

    oc new-project my-project
    oc secrets new docker-pull-secret .dockerconfigjson=${HOME}/.docker/config.json --namespace=my-project
    oc secrets link default docker-pull-secret --for=pull --namespace=my-project
    

    The problem was in https://github.com/openshift/origin/issues/13122
    Master somehow managed to pull and extract images faster, while nodes had a timeout.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.