Skip to content
This repository has been archived by the owner on Feb 16, 2019. It is now read-only.

VirtualService for gRPC not working with named port #349

Open
rfevang opened this issue May 22, 2018 · 1 comment
Open

VirtualService for gRPC not working with named port #349

rfevang opened this issue May 22, 2018 · 1 comment
Assignees
Milestone

Comments

@rfevang
Copy link

rfevang commented May 22, 2018

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.

@xiajidexue
Copy link

xiajidexue commented Jul 1, 2018

Any progresses?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants