0

I try to run an exposed service on my Macbook(M1). However, I failed to browse the service locally. What could be the root cause? Please see the attached images.

enter image description here enter image description here

David
  • 607
  • 1
  • 6
  • 19
  • What service do you use? LoadBalancer, NodePort, ClusterIP? – Rafał Leszko Mar 03 '22 at 08:28
  • @RafałLeszko - NodePort. – David Mar 03 '22 at 11:52
  • There is a similar question with the same error which can be helpful. Can you please check this [link](https://stackoverflow.com/questions/62375642/minikube-ip-returns-127-0-0-1-kubernetes-nodeport-service-not-accessable) and confirm? – Bakul Mitra Mar 03 '22 at 12:15
  • @BakulMitra - thank you for sharing the link. However, I tried the solution mentioned in the link it still failed. The browser gets popped up but still can't access the service with the IP and port. I'm wondering what could be the issue? – David Mar 06 '22 at 08:17
  • Hello @David, Are you still facing the problem? Was your problem resolved? Was my answer helpful. If you think that my answer helped you, please consider accepting it (✔️). I'd really appreciate it. Have a great day, thanks! – Bakul Mitra Mar 19 '22 at 03:48

2 Answers2

1

Is the shortcut command for fetching the minikube IP and a service’s NodePort not working?

minikube service --url <service-name>
Alan
  • 491
  • 4
  • 13
0

There are some limitations with minikube running with docker driver on MacOS. Please see this GitHub issue.

There are two options at least (more, but these are simple to do):

  • use the minikube tunnel

Tunnel is used to expose the service from inside of the VM where minikube is running to the host machine's network. Please refer to access applications in minikube.

This is how minikube_IP:NodePort transforms to localhost:different_port.

  • start minikube with VirtualBox driver to get a proper IP (if you really need to access your service on NodePort), below the command how to start it with VirtualBox driver (this should be installed on your machine):

      minikube start --driver=VirtualBox
    
Bakul Mitra
  • 432
  • 2
  • 7