How Do You Find the URL of Your Kubernetes Cluster?

Problem scenario
You want to view the website that is powered by Kubernetes. But you do not know which URL to go to. What should you do from the back-end server with kubectl?

Solution

1. Run this: kubectl get services
With the resulting output, find a name that you want the URL for. (Services have names.) Let's assume the name was "foobar".

2. Run this command: kubectl get service foobar -o wide

The resulting output should include an "EXTERNAL-IP" value that you can use.

Leave a comment

Your email address will not be published. Required fields are marked *