美文网首页
Istio修改IngressGateway网络类型

Istio修改IngressGateway网络类型

作者: 码二哥 | 来源:发表于2020-06-25 14:35 被阅读0次

ingressgateway的默认网络类型是LoadBanlancer,在没有外部负载均衡的情况下可以修改为NodePort。

1、将LB修改为NodePort

kubectl patch service istio-ingressgateway -n istio-system -p '{"spec":{"type":"NodePort"}}'

或者 直接编辑,打开后,找到LB,修改为NodePort

kubectl edit svc istio-ingressgateway -n istio-system

2、查看IP与端口号

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}')

相关文章

网友评论

      本文标题:Istio修改IngressGateway网络类型

      本文链接:https://www.haomeiwen.com/subject/lnysfktx.html