Kubernetes Deep Dive Room

Sign Up Free or Log In to participate!

Chapter 6, 3rd video(demo): How the heck were he able to hit the service on localhost:31000

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?

1 Answers

Hey Rodrigo,

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!

Nikita Kragel

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

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?