How to deploy a mirror image in the locally running Docker Registry with minikube in Mac?

  docker, question

Install minikube on the Mac, run the registry container and push the application.

$ curl http://localhost:5000/v2/_catalog

In kubernetes’ deployment configuration file:

 replicas: 3
 app: app1
 tier: backend
 - image: localhost:5000/app1
 name: app1

Error in dashboard’s Pods:

Failed to pull image "localhost:5000/app1": rpc error: code = 2 desc = Error while pulling image: Get http://localhost:5000/v1/repositories/app1/  images: dial tcp getsockopt: connection refused
 Error syncing pod

From this we can see the solution: …

Docker-machine changed:

eval $(minikube docker-env)

In carrying out this step:

kubectl port-forward --namespace kube-system \
 $(kubectl get po -n kube-system | grep kube-registry-v0 | \
 awk '{print $1;  }') 5000:5000

Pending has not responded:

Forwarding from -> 5000

Why? How?

To do this:

Start minikube:

minikube start

Tag the local docker images and bring them to Kubernetes IP:

docker tag app1

At homeinsecure registriesAdd:

Pushed into Kubernets’ registry:

docker push

Check the registry for K8S:


Switching docker machine to minikube:

eval $(minikube docker-env)

Perform deployment scheduling operations. Mirror access:[:tag]

Useful resources

minikube start --insecure-registry "" …