Install Minikube using private registry

11/29/2021

For security purposes, I need to install Minikube using private Harbor repository (it works as proxy) - harbor.mycompany.com. minikube start has several options to use repos:

--registry-mirror
--mirror-repository
--insecure-registry

Installing without private repo works perfect. But I can't figure out how to set private Harbor repo correctly. For example this way:

minikube start --registry-mirror https://harbor.mycompany.com

still install from public repo. Using

minikube start --image-repository harbor.mycompany.com --insecure-registry harbor.mycompany.com

I got:

! The image 'harbor.mycompany.com/kubernetesui/dashboard:v2.3.1' was not found; unable to add it to cache.
! The image 'harbor.mycompany.com/kube-controller-manager:v1.22.3' was not found; unable to add it to cache.
! The image 'harbor.mycompany.com/kube-proxy:v1.22.3' was not found; unable to add it to cache.
! The image 'harbor.mycompany.com/coredns/coredns:v1.8.4' was not found; unable to add it to cache

Looks like it creates wrong paths to images (harbor.mycompany.com/kube-proxy:v1.22.3 instead of harbor.mycompany.com/k8s.grc.io/kube-proxy:v1.22.3 for example)

So, how to set private repository or mirror correctly for installing Minikube?


Also I tried to push all needed images to harbor.mycompany.com manually. And use

minikube start --image-repository harbor.mycompany.com/minikube --insecure-registry harbor.mycompany.com:443

This way I don't get ! The image was not found message, but get

 [ERROR ImagePull]: failed to pull image: output: Error response from daemon: unauthorized: unauthorized to access repository

Even if I copy .pem file to .minikube/certs

-- Mikhail_Sam
docker-registry
harbor
kubernetes
minikube
proxy

0 Answers