kubernetes-example-voting-app
kubernetes-example-voting-app copied to clipboard
How to visit the vote page(what's the url)
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!
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
.