【发布时间】:2019-01-22 09:14:12
【问题描述】:
在 helm values 文件中有一个带有描述的设置 global.k8sIngressSelector。
用于旧版 k8s Ingress 资源的网关。默认情况下是 使用 'istio:ingress' 来匹配 0.8 配置。它要求 ingress.enabled 设置为 true。你也可以设置 到ingressgateway,或您在“网关”中定义的任何其他网关 部分。
我对此的解释是,istio ingress 应该选择正常的 ingress 配置,而不是必须创建虚拟服务。这个对吗?我试过了,它不适合我。
kind: Deployment
apiVersion: apps/v1
metadata:
name: echo
spec:
replicas: 1
selector:
matchLabels:
app: echo
template:
metadata:
labels:
app: echo
spec:
containers:
- name: echo
image: mendhak/http-https-echo
ports:
- containerPort: 80
---
kind: Service
apiVersion: v1
metadata:
name: echo
spec:
type: ClusterIP
selector:
app: echo
ports:
- port: 80
name: http
这行得通
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: gateway
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- '*.dev.example.com'
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: echo
spec:
hosts:
- echo.dev.example.com
gateways:
- gateway
http:
- route:
- destination:
host: echo
这不是
kind: Ingress
apiVersion: extensions/v1beta1
metadata:
name: echo
spec:
rules:
- host: echo.dev.example.com
http:
paths:
- backend:
serviceName: echo
servicePort: 80
【问题讨论】:
标签: istio