VirtualService for gRPC not working with named port
Opened this issue · 1 comments
Is this a BUG or FEATURE REQUEST?:
BUG
Did you review https://istio.io/help/ and existing issues to identify if this is already solved or being worked on?: Yes
Bug:
Y
What Version of Istio and Kubernetes are you using, where did you get Istio from, Installation details
istioctl version: release-0.8-20180515-17-26
kubectl version: Server 1.9.6-gke.1, Client 1.8.6
Is Istio Auth enabled or not ?
Not
Did you install the stable istio.yaml, istio-auth.yaml.... or if using the Helm chart please provide full command line input.
Used istio.yaml
What happened:
503 when calling gRPC method exposed via gateway + virtualservice
What you expected to happen:
I expected the request to be routed to the service specified by virtualservice
How to reproduce it:
Relevant yaml definitions:
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: internal-grpc
spec:
hosts:
- "*"
gateways:
- internal-grpc-gateway
http:
- match:
- uri:
prefix: /grpc.reflection.v1alpha.ServerReflection
route:
- destination:
port:
# number: 31001
name: grpc
host: ts-service
weight: 100
---
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: internal-grpc-gateway
spec:
selector:
istio: ingressgateway
servers:
- hosts:
- "*"
port:
number: 80
protocol: grpc
---
apiVersion: v1
kind: Service
metadata:
name: ts-service
labels:
interface: grpc
environment: test
spec:
selector:
app: ts-server
ports:
- name: grpc
port: 31001
targetPort: grpc
Note that commenting out the name: grpc
line and uncommenting the number: 31001
line makes this work correctly.
Any progresses?