kubernetes-example-voting-app icon indicating copy to clipboard operation
kubernetes-example-voting-app copied to clipboard

How to visit the vote page(what's the url)

Open zhongy1999 opened this issue 2 years ago • 1 comments

the pods are running, port 31000 and port 31001 are used by a process called kube-proxy. to visiti the web page, I visit localhost:31000 at the master node, but it displays "Unable to establish connection". what's the reason, thanks!

zhongy1999 avatar Jul 23 '22 16:07 zhongy1999

Since you say you're trying to access a port on localhost, I assume that you're running Kubernetes on your own computer.

In that case, you will need to change the definition files for the Voting-App service and the Result-App service. You need to change the service type from LoadBalancer to NodePort.

This will dynamically assign a port above 30k to the service. You can see which port, with kubectl get services, or kubectl describe service result-service.

cptfixit avatar Dec 03 '22 21:12 cptfixit