Not able to access Kubernetes NodePort Service

I created the service as per the course:

apiVersion: v1
kind: Service
  name: myapp-service
  type: NodePort
    app: myapp
  - port: 80
    targetPort: 80
    nodePort: 30008

but whenever I try to run the minikube service myapp-service --url I get
❗  Because you are using a Docker driver on darwin, the terminal needs to be open to run it.

As you can see, the port number doesn’t match the Service definition file and when I try to open this URL on my browser, it doesn’t work.

Hi @Aditya-Pande

Please see Accessing apps | minikube

This documentation was updated in May as a result of Mac users getting this issue. I do not have a Mac, so cannot reproduce it to verify.

Hi @Aditya-Pande,
Please check this discussion also.


I am still stuck, this solution doesn’t work for me. The guy in the other thread seemed to be having the same issue and this fix didn’t work for him either