Unable to pull docker image from artifactory repo to kubernets cluster

3/26/2020

I deployed kubernetes cluster with Weave CNI and so far I am able to deploy pods as needed. Now we are trying pull the docker images from articatory, but somehow its not working. getting the below error. surprisingly I am able to pull/push images from AWS ECR repo. Just baffling why we are failed to pull images to kubernetes cluster from artifactory which does not have any restrictions nor authentication. able to the images from this artifactory to regular docker VM's(which are running outside kubernetes cluster):

Version:

Client Version: v1.17.2
Server Version: v1.17.2

Host OS:
Centos 7.7

CNI:
Weave

Error:

**Trying to pull repository artifactory.gns.rms-internal.com/rms-docker-pr-local/sdp/rms/model-platform/model-engine-kubernetes ... **

Get https://artifactory.internal.com/v1/_ping: dial tcp :443: connect: no route to host

Appreciate any inputs or suggestions.

Thanks, CS

-- user1739504
kubernetes
kubernetes-ingress

1 Answer

3/26/2020

Problem is with a network, you have to remove all unused networks:

$ docker network prune  

Then set the bit option on.

docker -> deamon.json -> bip 

Just add "bip": " xxx.yyy.zzz.vvv/ww" line to deamon.json . Restart docker:

$ docker restart

Docker is creating sub-networks on the same range that your private registry .

Take a look here: pulling-images-issue, bridge-networks, docker-compose-subnet, docker-pulling-issue.

Take a look also on: artifactory-on-prem.

Please let me know if it helps.

-- MaggieO
Source: StackOverflow