How can I open the Jaeger UI(run in Istio) in a remote browser, not the localhost machine

3/19/2019

The Istio (version 1.0.6) official document says:

We can access the Jaeger UI by the following action:

Kubectl port-forward -n istio-system $(kubectl get pod -n istio-system -l app=jaeger -o jsonpath=’{.items[0].metadata.name}’) 16686:16686 &

Then we can use http://localhost:16686. But the localhost is a Linux machine, it doesn't have a browser. I must open the browser on a remote machine. How can I do this? Thanks.

-- dnd shantaram
istio
jaeger
kubernetes

3 Answers

3/19/2019

You can create a NodePort service using the app: jaeger selector to expose the UI outside the cluster.

-- Stefan P.
Source: StackOverflow

4/3/2019

kubectl port-forward command default is expose to localhost network only, try to add --address 0.0.0.0

$ kubectl port-forward -n istio-system \
 $(kubectl get pod -n istio-system -l app=jaeger -o jsonpath=’{.items[0].metadata.name}’) \
  --address 0.0.0.0 16686:16686 &

see kubectl command reference

-- Larry Cai
Source: StackOverflow

4/3/2019

There are several ways of doing this. The port-forward works fine on Google Cloud Shell. If you are using GKE, then I strongly recommend using Cloud Shell, and port-forward as it is the easiest way. On other clouds, I don't know.

What is suggesting Stefan would work. You can edit the jaeger service with kubectl edit svc jaeger-query, then change the type of the service from ClusterIP to NodePort. Finally, you can access the service with NODE_IP:PORT (any node). If you do kubectl get svc, you will see the new port assigned to the service. Note: You might need to open a firewall rule for that port.

You can also make the service type LoadBalancer, if you have a control plane to set up an external IP address. This would be a more expensive solution, but you would have a dedicated external IP address for your service.

There are more ways, but I would say these are the appropriate ones.

-- suren
Source: StackOverflow