问题描述
我已经按照 docs 配置了一个带有 istio-ingressgateway 的 K8S 集群。
虽然 HPE Container Platform 管理的 haproxy 网关可以将流量路由到 istio-ingressgateway,但我想直接访问主机端点。
如何确定避开托管 haproxy 网关的主机的入口 IP 地址和端口?
解决方法
我是这样找到信息的:
$ kubectl get po -l istio=ingressgateway -n istio-system \
-o jsonpath='{.items[*].status.hostIP}'
10.1.0.193 10.1.0.132 10.1.0.174
找到的端口如下:
$ kubectl -n istio-system get service istio-ingressgateway \
-o jsonpath='{.spec.ports[?(@.name=="http2")].nodePort}'
32725
$ kubectl -n istio-system get service istio-ingressgateway \
-o jsonpath='{.spec.ports[?(@.name=="https")].nodePort}'
30557
$ kubectl -n istio-system get service istio-ingressgateway \
-o jsonpath='{.spec.ports[?(@.name=="tcp")].nodePort}'
[no data returned]
来源:istio docs