I am running multinode k8s cluster on my workstation. I have created the VM's using multipass. K8s cluster is deployed using microk8s.
Microk8s provides private registry as a addon.
It is providing 32000 as node port for the registry.
I would like to connect to this cluster remotely and push docker images to this registry.
I have added 172.**.44.***:32000
as insecure registery in my docker settings in my remote pc.
Note: 172.**.44.***
is the IP of the cluster (something you get in kubectl cluster-info)
But I am unable to make it work
docker build -t 172.**.44.***:32000/myapp:v1 .
docker push 172.**.44.***:32000/myapp:v1
Get http://172.**.44.***:32000/v2/: dial tcp 172.**.44.***:32000: connect: no route to host
I didn't use microk8s
to set up kubernetes cluster before, but I do have the feeling is, the ip of 172.xx.xx.xx
is the wrong IP that you can't connect it from your local pc.
so what's the output of below commands:
- What's the nodes IP, include master and work nodes?
kubernetes get nodes -o wide
- What's the service setup?
kuberentes get services
can you make sure the service to that's private registry server's port is setup and can be connected.
- check your own PC's IP
# for windows
ipconfig
# for linux/macos
ifconfig
maybe there are many IPs in output, make sure you get the proper local IP for your PC.
For example, it is something like 10.xx.xx.xx
, then you should use similar IPs to connect to that private registry server, you just need find it out
- check what network CNI you are using, weavenet, flannel, etc.
the IP of 172.xx.xx.xx
are mostly used by these network CNI provider, it can be used in kubernetes cluster, but not your local host.