ingressgateway的默認網絡類型是LoadBanlancer,在沒有外部負載均衡的狀況下能夠修改成NodePort。node
一、修改json
kubectl patch service istio-ingressgateway -n istio-system -p '{"spec":{"type":"NodePort"}}'
二、查看ID與端口網絡
export INGRESS_HOST=$(kubectl get po -l istio=ingressgateway -n istio-system -o 'jsonpath={.items[0].status.hostIP}') export INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="http2")].nodePort}')
三、訪問方式負載均衡
可經過節點的IP+端口訪問,也能夠手動掛個LB進來jsonp