如何在非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 &

 

  

 

posted @ 2018-07-11 10:35  yuxiaoba  阅读(793)  评论(0编辑  收藏  举报