Connection problem between GCP's Anthos istio Grpc and gateway

Viewed 18

I have set up the yaml file as below.

[ order-gateway.yaml ]

apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: grpc-gateway
  namespace: order
spec:
  selector:
    istio: ingressgateway
  servers:
    - port:
        number: 80
        name: http
        protocol: HTTP
      hosts:
        - “*”
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: grpc-1-vs
  namespace: order
spec:
  hosts:
  - “*”
  gateways:
  - grpc-gateway
  http:
  - match:
    - uri:
       prefix: /api
    route:
      - destination:
         host: order
         port:
           number: 50052

[ orderDeploy.yaml ]

apiVersion: v1
kind: ServiceAccount
metadata:
  name: order
  namespace: order
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: order-service
  namespace: order
spec:
  selector:
    matchLabels:
      app: order-service
  template:
    metadata:
      labels:
        app: order-service
    spec:
      serviceAccountName: order
      terminationGracePeriodSeconds: 5
      containers:
        - name: server
          image: us-central1-docker/...
          ports:
            - containerPort: 50052
          env:
            - name: PORT
              value: "50052"
            - name: DISABLE_STATS
              value: "1"
            - name: DISABLE_TRACING
              value: "1"

[ orderService.yaml ]

apiVersion: v1
kind: Service
metadata:
  name: order-service
  namespace: order
spec:
  type: ClusterIP
  selector:
    app: order-service
  ports:
  - name: grpc
    port: 50052
    targetPort: 50052

However, communication between the ingress gateway and the grpc server is not working properly, and the connection using the url is also not possible. What should I do?

The above is the contents of the yaml file for deployment, service, gateway, and virtual service. Is there any configuration that could cause problems with the grpc connection in this part?

0 Answers
Related