Can somebody told me how he was able to hit the service in localhost:31000? I didn’t really get how. It was nodeport, but how in localhost?
I think near the beginning of the video he mentions that he is running this demo on his laptop, not in the cloud. That would allow him to use Localhost since everything he’s using is local to his laptop.
You are right about the nodePort configuration though. He has his github link in the course resources. The web-nodeport.yml defines port 31000. So with the combination of running everything local on his laptop in addition to nodePort being defined for 31000, this would allow him to access the service using localhost:31000.
He makes some mention at about 8:56 in the video!
Hope that helps!
Hi, just a simple addition: you could run kubectl port-forward service/web-nodeport 8080:8080 in order to port-forward this service to localhost. Then you will be able to reach an app at localhost:8080 without a load balancer. Hope this helps someone