I am running a local Kubernetes cluster (Minikube) against an also local private registry (Nexus OSS) and I am having a difficult time configuring my Minikube cluster to work off of my private registry in my host machine.
Basically I can push/pull images to my local private registry from my host but when I try minikube to pull from them the docker inside minikube is unable reach my private nexus. So I would like to be able to setup daemon.json with an insecured registry to my private repo and a config.json with auths for it (just like in my host) so that minikube can pull the images down and turn them into pods. Below is my setup for Nexus, Docker and Minikube
NEXUS OSS
I have my nexus sonatype configured in docker-compose.yaml to run on ports 8081 for the web app interface and ports 8082 and 8083 for docker repositories as follows:
DOCKER
I have created a hosts entry (/etc/hosts) as follows:
127.0.1.1 docker.local
I have added the following insecure registries in /etc/docker/daemon.json
And I also added the following auth tokens to ~/.docker.config.json by running the docker login command twice for each port
and I have been able to push images to it and verified that I can pull them after removing them from my local host by running:
docker pull docker.local:8082/imageName:tag
MINIKUBE
I have tried starting minikube several different ways:
minikube start
minikube start --driver=docker --insecure-registry=host.minikube.internal:8082
minikube start --driver=docker --insecure-registry=docker.local:8082
minikube start --driver=docker --insecure-registry=http://host.minikube.internal:8082
minikube start --driver=docker --insecure-registry=http://docker.local:8082
Then when I do:
minikube ssh
followed by (any of these) with the username and password at the prompt:
docker login host.minikube.internal:8082
docker login http://host.minikube.internal:8082
This is my docker info output inside Minikube
Insecure Registries:
10.96.0.0/12
10.0.0.0/24
127.0.0.0/8
and this is my docker info in my host machine (Linux/Pop OS - debian based)
Insecure Registries:
docker.local:8082
docker.local:8083
host.minikube.internal:8082
127.0.0.0/8
Any help is very much appreciated.