Istio修改IngressGateway网络类型

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

相关文章
相关标签/搜索