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

 

1、修改

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

2、查看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}')

3、访问方式

可通过节点的IP+端口访问,也可以手动挂个LB进来

相关文章:

  • 2022-03-06
  • 2021-11-16
  • 2021-11-23
  • 2022-02-16
  • 2023-02-17
猜你喜欢
  • 2021-04-03
  • 2022-12-23
  • 2021-06-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案