如何在非localhost情况下访问Istio中的服务UI

  在使用Istio时经常会遇到需要用localhost访问服务UI才能看到相关的一些数据

  但对于远程连接的时候使用localhost并不方便,所以需要修改一下它的部署文件,将原先的cluster IP改为NodePort类型

 

  具体修改的内容的话,可以进入到部署文件中,找到grafana中的service部署

  将type 改成NodePort ,然后再增加一个nodePort

  然后就可以根据grafana的pod的地址加上nodePort端口访问到grafana

  最后修改端口映射

kubectl -n istio-system port-forward $(kubectl -n istio-system get pod -l app=grafana -o jsonpath='{.items[0].metadata.name}') 3000:33333 &

  

在这个国度中,必须不停地奔跑,才能使你保持在原地。如果想要寻求突破,就要以两倍现在速度奔跑!
原文地址:https://www.cnblogs.com/yuxiaoba/p/9293201.html