4

I am trailing Kubernetes on AWS, and I have a cluster set up, but having trouble creating an application by pulling a docker image from an insecure repo.

When I created the cluster, I ensured that the environment variable KUBE_ENABLE_INSECURE_REGISTRY=true was set to true. But I still don't seem to be able to pull from this repo.

The logs show (edited application name and registry URL):

Error syncing pod, skipping: failed to "StartContainer" for "" with ErrImagePull: "API error (500): unable to ping registry endpoint https://docker-registry..com:5000/v0/\nv2 ping attempt failed with error: Get https://docker-registry..com:5000/v2/: EOF\n v1 ping attempt failed with error: Get https://docker-registry.*.com:5000/v1/_ping: EOF\n"

Can anyone please advise on this?

Thanks

2 Answers 2

1

According to this code, it seams that, only registries on network 10.0.0.0/8 can be insecure, is your registry on this range? What about setting EXTRA_DOCKER_OPTS="--insecure-registry YOUR_REGISTRY_IP" manually to docker environment file? Is that possible for you?

2
  • 1
    hi, i ended up creating a new cluster using "EXTRA_DOCKER_OPTS=" --insecure-registry". How would i have set this without needing to rebuild the cluster?
    – osmo
    Mar 21, 2016 at 11:28
  • Did you find a solution for your question? Also, I appreciate if you can explain how you create the cluster using "EXTRA_DOCKER_OPTS=" --insecure-registry".
    – turgos
    Jun 23, 2016 at 1:34
0

You can config it in each work node, add the file in each node /etc/docker/daemon.json

{
  "debug": true,
  "experimental" : true,
  "insecure-registries" : [
    "your-registry.domain.name"
  ]
}

Then restart the docker at each node

service docker restart
1
  • You also need to provide an insecure registry port, see documentation
    – mipo256
    Nov 28, 2021 at 10:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.