Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

PullImageError #9

Closed
theganyo opened this issue Jan 26, 2016 · 9 comments
Closed

PullImageError #9

theganyo opened this issue Jan 26, 2016 · 9 comments

Comments

@theganyo
Copy link

I'm getting the following error when attempting to create a pod in the environment:

bash-3.2$ kubectl get po
NAME             READY     STATUS           RESTARTS   AGE
ingester-hgdcr   1/2       PullImageError   1          29m

The image in question is just a public image being pulled from dockerhub:

      containers:
      - name: nginx
        image: scottganyo/nginx-sandwich-nginx

I've deployed the same file in other Kubernetes environments without issue... is there something different you're doing here than the standard setup?

Related: Is there a way I can just use local docker images in this K8s environment instead of going through docker hub?

@rimusz
Copy link
Member

rimusz commented Jan 26, 2016

@theganyo there is no difference then other Kubernetes cluster setups, coreos + k8s cluster bootstrapped via fleet units with go binaries. Not pulling images cloud be related to your network setup.
Do ssh to node1 (via menu) and try docker pull scottganyo/nginx-sandwich-nginx, it did work for me fine.
you can point to any local registry by e.g. 192.168.64.1:5000/scottganyo/nginx-sandwich-nginx
btw my CoreOS OSX VM does have the private registry, the IP I showed above, and you can build your docker images there, this is what I'm exactly doing in my local setup

@theganyo
Copy link
Author

Thanks. I'm not an expert on Docker / Kubernetes (at least not yet). Are you saying that a private registry automatically runs by default in this system? Is that started on the k8smaster-01 box?

@rimusz
Copy link
Member

rimusz commented Jan 26, 2016

No worries, this is why we are learning new stuff.

I'm saying that private registry runs in this App https://github.com/TheNewNormal/coreos-osx on 192.168.64.1 IP where you can build your docker images.

@theganyo
Copy link
Author

Ah. Gotcha. I'll look into using that.

On more sort of related question that hopefully you can answer off-the-cuff: I'm trying to expose an external port to nginx from k8s. What IP address would I specify in my externalIPs setting?

@rimusz
Copy link
Member

rimusz commented Jan 26, 2016

externalIPis only for cloud providers which are supported by kubernetes, for local/bare-metal you need to use hostPort in replication controller

@theganyo
Copy link
Author

Thanks for your help!

@rimusz
Copy link
Member

rimusz commented Jan 26, 2016

no worries :)

@theganyo
Copy link
Author

Sorry, one more quick thing... you mentioned you use a local docker registry for your work... could you share your process for pushing your images into it and referencing it? I'm trying to figure out a dev process that works efficiently with all this stuff.

@rimusz
Copy link
Member

rimusz commented Jan 26, 2016

On CoreOS OSX VM shell do this:

bash-3.2$ docker pull alpine
Using default tag: latest
latest: Pulling from library/alpine
Status: Image is up to date for alpine:latest
bash-3.2$ docker tag alpine 192.168.64.1:5000/alpine
bash-3.2$ docker push 192.168.64.1:5000/alpine
The push refers to a repository [192.168.64.1:5000/alpine] (len: 1)
2314ad3eeb90: Image successfully pushed

ssh to one of kube-cluster nodes and do:

core@k8snode-01 ~ $ docker pull 192.168.64.1:5000/alpine
Using default tag: latest
latest: Pulling from alpine
2314ad3eeb90: Pull complete
Status: Downloaded newer image for 192.168.64.1:5000/alpine:latest

in Kubernetes replication controller then use image prefixed with 192.168.64.1:5000/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants