I’ve read a similar issue in #23720: gRPC Ingress with wildcard host match returns "Unimplemented" on client side · Issue #27320 · istio/istio · GitHub ; however, in the github issue, the root cause is using a wildcard in the VirtualService host section. I do not use wildcards; my Gateway and VirtualServices are as follows:
---
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: lh-gateway
namespace: default
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 80
name: grpc-all
protocol: GRPC
hosts:
- "lh.demo.littlehorse.cloud"
- port:
number: 80
name: grpc-0
protocol: GRPC
hosts:
- "lh-0.demo.littlehorse.cloud"
- port:
number: 80
name: grpc-1
protocol: GRPC
hosts:
- "lh-1.demo.littlehorse.cloud"
- port:
number: 80
name: grpc-2
protocol: GRPC
hosts:
- "lh-2.demo.littlehorse.cloud"
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: lh-server
namespace: default
spec:
hosts:
- "lh.demo.littlehorse.cloud"
gateways:
- lh-gateway
http:
- route:
- destination:
port:
number: 5000
host: lh-server.default
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: lh-server-0
namespace: default
spec:
hosts:
- "lh-0.demo.littlehorse.cloud"
gateways:
- lh-gateway
http:
- match:
- port: 5000
route:
- destination:
port:
number: 5000
host: lh-server-0.default
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: lh-server-1
namespace: default
spec:
hosts:
- "lh-1.demo.littlehorse.cloud"
gateways:
- lh-gateway
http:
- match:
- port: 5000
route:
- destination:
port:
number: 5000
host: lh-server-1.default
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: lh-server-2
namespace: default
spec:
hosts:
- "lh-2.demo.littlehorse.cloud"
gateways:
- lh-gateway
tcp:
- match:
- port: 5000
route:
- destination:
port:
number: 5000
host: lh-server-2.default
All attempts to make a gRPC request to lh.demo.littlehorse.cloud
result in the following error:
Failed to connect: rpc error: code = Unimplemented desc = 2023/02/10 17:43:15 rpc error: code = Unimplemented desc =
Is there a bug in my virtualservice definition?
I have tried replacing the http
section with tcp
in the VirtualServices (and using tcp
as the protocol in the Gateway) but the behavior is the same.
Thank you in advance.