istio ingressgateway 服务类型使用externalIPs模式

This commit is contained in:
data-infra 2023-12-19 17:14:47 +08:00
parent 6b306b086b
commit 2168ff9f7d
2 changed files with 4 additions and 4 deletions

View File

@ -9712,7 +9712,7 @@ metadata:
operator.istio.io/component: "IngressGateways"
spec:
# type: LoadBalancer
type: NodePort
# type: NodePort
selector:
app: istio-ingressgateway
istio: ingressgateway
@ -9725,12 +9725,12 @@ spec:
port: 80
protocol: TCP
targetPort: 8888
nodePort: 80
# nodePort: 80
- name: http3
port: 8080
protocol: TCP
targetPort: 8889
nodePort: 8080
# nodePort: 8080
# - name: https
# port: 443
# protocol: TCP

View File

@ -149,7 +149,7 @@ kubectl apply -k cube/overlays
# 配置入口
#ip=`ifconfig eth1 | grep 'inet '| awk '{print $2}' | head -n 1`
#kubectl patch svc istio-ingressgateway -n istio-system -p '{"spec":{"externalIPs":["'"$1"'"]}}'
kubectl patch svc istio-ingressgateway -n istio-system -p '{"spec":{"externalIPs":["'"$1"'"]}}'
# 本地电脑手动host
echo "打开网址http://$1"