Hi Team,
Could you please help me to understand configuration of VirtualServices. Example of two VS:
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: app-health
spec:
hosts:
- application.my.site.com
gateways:
- mygw
http:
- match:
- uri:
exact: /health
route:
- destination:
host: application-svc
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: swagger
spec:
hosts:
- *
gateways:
- mygw
http:
- match:
- uri:
prefix: /swagger
route:
- destination:
host: swagger-svc
When I curl following:
- application.my.site.com/health - works
- application-2.my.site.com/swagger - work
- application.my.site.com/swagger - NR (no route)
I verified route istio-ingressgateway and it exist:
istioctl proxy-config route istio-ingressgateway
[
{
“name”: “https.443.https.traefik-techfoundation-adhoc.adhoc”,
“virtualHosts”: [
{
“name”: “:443",
“domains”: [
"”,
“*:443”
],
“routes”: [
{
“match”: {
“prefix”: “/swagger”,
“caseSensitive”: true
},
“route”: {
“cluster”: “outbound|443||swagger-svc.ns.svc.cluster.local”,
…
}
…
{
“name”: “application.my.site.com”:443",
“domains”: [
“application.my.site.com”“,
“application.my.site.com”:443”
],
“routes”: [
{
“match”: {
“path”: “/health”,
“caseSensitive”: true
},
“route”: {
“cluster”: “outbound|443||application-svc.ns.svc.cluster.local”,
“timeout”: “0s”,
…
]
}
]
Istio 1.3.0. If I delete second VS - application.my.site.com/swagger - works.
Am i missing something?