how to configure minikube to use docker private registry

7/24/2019

I am configuring minikube to use local docker registry which is cumbersome task though there are many questions on local docker registry. I have few questions to understand better.

I setup docker private registry following here and it worked. Then I started minikube using below command and minikube started successfully by loading the images.

minikube start --insecure-registry localhost:5000

Then executed the export the command "eval $(minikube docker-env)" to use the minikube docker environment. The docker images listing images from minikube server. But docker and kubectl is not pulling the images from local private registry and even outside, why is docker not using the local registry ?

root@arun-desktop:/opt/minikube# docker pull my-ubuntu
Using default tag: latest
Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

here is the content of daemon.json

root@arun-desktop-e470:/opt/minikube# cat /etc/docker/daemon.json
 {
     "insecure-registries" : [ "localhost:5000" ]
 }
 {
    "dns": ["8.8.4.4", "8.8.8.8"]
 }

Am connected to company network,so having set the below for http/https proxy.

root@arun-desktop:/opt/minikube# env|grep proxy
https_proxy=http://my-proxy:8080
http_proxy=http://my-proxy:8080
no_proxy=192.168.99.100,172.17.0.1/16,10.x.x.0/16,127.0.0.1,localhost,::1
ftp_proxy=http://my-proxy:8080
  1. do I need to set the docker local registry inside the minikube server?
  2. Why is docker not reaching internet to pull the public images
  3. What config changes are required in order to make the minikube docker to use the local registry?
-- arunp
docker
kubernetes
minikube

0 Answers