Not able to access Kubernetes NodePort Service

I created the service as per the course:

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

but whenever I try to run the minikube service myapp-service --url I get

http://127.0.0.1:55318
❗  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.

Regards,

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

Hey @Aditya-Pande I’m having the same issue, did you resolve the issue?