Kubernetes & insecure docker registries

3/18/2016

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 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

-- osmo
docker
kubernetes

2 Answers

9/14/2018

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
-- Jack
Source: StackOverflow

3/20/2016

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?

-- dohnto
Source: StackOverflow