Minikube Insecure Docker Registry

Setting up a private registry inside a minikube environment

Create deployment

kubectl create deployment registry --image=registry

Expose deployment

kubectl expose deploy/registry --port=5000 --type=NodePort

Capture the nodeport plus the minikup ip

vi ~/.minikube/machines/minikube/config.json

Add the line with your minikube IP-Address along with NodePort

"InsecureRegistry": [
                "10.96.0.0/12",
                "10.0.0.0/24",
                "192.168.49.2:32671"

Stop minikube & docker

stop minikube
stop docker

Edit /lib/systemd/system/docker.service

Add the insecure-registry line

vi /lib/systemd/system/docker.service

ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock --insecure-registry 192.168.49.2:32671

Start docker & minikube

start docker
start minikube
Last updated on 11 Nov 2021
Published on 11 Nov 2021