'Failed to run exposed service on MacBook Pro M1

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



Solution 1:[1]

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
    

Solution 2:[2]

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

minikube service --url <service-name>

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Bakul Mitra
Solution 2 Alan