-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using local docker registry inside minikube cluster with 'none' driver #13346
Comments
If you want to use your external registry inside the cluster (without using the real IP), you need to modify the proxy from the "registry" add-on. By default it will proxy to registry.kube-system.svc.cluster.local but you want it to use the host registry. We don't recommend running the "none" driver on your laptop, since there is no isolation between "your files" and the cluster. For instance if the disk goes full then the kubelet will start deleting images to free up some space on the control plane node. |
It's actually something that could be a nice feature, and would deserve some better documentation. |
Alternatively one could set up a real (https) registry inside the cluster, and avoid the localhost (http) hack. This would involve creating and distributing the ssl certs for the registry ClusterIP, to the other nodes/pods. |
@afbjorklund thank you for your prompt and detailed reply. I really appreciate your help. I took you advice and deployed minikube with docker driver this time. As for the My settings are as follows: minikube with docker driver and following flags pertaining registry:
I tried to reply the registry and proxy using the manifest below. I also tried deploying the proxy alone, but it did not help. The only this I changed in the original deployment (was substitution in the proxy
I really appreciate one more helpful hand in this problem. Of course, the working solution will be posted here to allow other users to solve this problem quickly. |
I thought you already had a registry, and just wanted to run the "proxy" (nginx) part of the hack There was some more useful documentation, before the proxy got removed from kubernetes... But running with the real host IP is much cleaner, even if it requires either "insecure" or certs: https://docs.docker.com/registry/deploying/ The "internal" host IP should be available |
I have a registry, but on the host machine, outside the k8s. The only thing I would like to have to resolve |
Here was the direct link: cluster/addons/registry/README.md#expose-the-registry-on-each-node And here is the proxy: cluster/addons/registry/images/Dockerfile (it is a fairly basic |
Hi @mikwieczorek, were you able to resolve this based on @afbjorklund's comment above? |
@klaases No, I did not use |
Hi @mikwieczorek - this issue seems to be related to local networking settings. Please feel free to re-open the issue by commenting with Additional information that may be helpful:
Thank you for sharing your experience! |
Hi,
I am learning kubernetess using minikube and I encountered a problem with using local docker registry inside minikube.
I have a docker registry running on my laptop with 5000:5000 port-forwarding.
Minikube is run with
none
driver and with--insecure-registry
flag.However, when I enter into a pod and run:
curl localhost:5000/v2/_catalog
<- does not workcurl 127.0.0.1:5000/v2/_catalog
<- does not workcurl <laptop-ip>:5000/v2/_catalog
<- worksregistry
add-on seems not to work withnone
driver.Deployment of docker registry inside cluster and port-forwarding of 5000:5000 does not work as port 5000 is already taken by my host-machine docker registry.
Is there any way around to be able to use
localhost:5000
from the inside of a cluster or is the only way in these settings?I tried different approaches, but I am new to k8s and I could not find any working solution in docs.
The text was updated successfully, but these errors were encountered: