I have a local insecure docker registry which I created using the command:
docker run -d -p 5000:5000 --restart=always --name registry registry:2` I have added this to the /etc/docker/daemon.json as well. I tagged several images in the format localhost:5000/<orgname>/<imagename>:<tag> and pushed them to the insecure registry.
When I run curl -X GET localhost:5000/v2/_catalog I can see that they are available inside the local registry.
I started minikube with the command minikube start --insecure-registry="localhost:5000". Here, my default driver is docker (I also tried with kvm2). I enabled the registry addon as well using the command minikube addons enable registry
I have a configmap which states the image in the format I mentioned earlier. When I apply this using kubectl, I get an ImagePullBackoff error with the error message 
Failed to pull image "localhost:5000/org/product:tag": rpc error: code = Unknown desc = Error response from daemon: manifest for localhost:5000/org/product:tag not found: manifest unknown: manifest unknownAny ideas as to why this is happening?
Docker version: 19.03.8, build afacb8b7f0
Minikube version: 1.9.2
Ubuntu 20.04 LTS
I was able to solve this issue by replacing localhost with my IP.
minikube start --insecure-registry="<IP-of-your-computer>:5000"Have to use the IP instead of localhost when tagging and pushing images to te local registry as well.
I used following on Ubuntu 20.04
1. Start the minikube with insecure-registry as your computer's ip:minikube start --insecure-registry="<your-computer-ip>:5000"
2. Enable the registry:minikube addons enable registry
3. make sure registry is up and running:kubectl get service --namespace kube-system
kubectl port-forward --namespace kube-system service/registry 5000:80docker tag my/image localhost:5000/myimagedocker push localhost:5000/myimageWell, the minikube K8s subnet is different from the one that your registry is running so localhost is not going to work without some tweaks. I recommend following the minikube official guide and not run:
docker run -d -p 5000:5000 --restart=always --name registry registry:2` In essence, it says that after running:
minikube addons enable registryThen when you create your minikube instance
minikube start --drive=docker --insecure-registry "10.0.0.0/24"