<p>I am trying to implement ingress for gRPC services. When i use single service it works fine but as soon as i integrate second service i am unable to call it.</p>
<p>below is the code for this. My both services are exposed as NodePort.</p>
<pre><code>#### Ingress ####

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    alb.ingress.kubernetes.io/backend-protocol-version: GRPC
    alb.ingress.kubernetes.io/listen-ports: '[{&quot;HTTPS&quot;:443}]'
    alb.ingress.kubernetes.io/target-type: instance
    kubernetes.io/ingress.class: alb
    alb.ingress.kubernetes.io/scheme: internal
    service.beta.kubernetes.io/aws-load-balancer-internal: &quot;true&quot;
    alb.ingress.kubernetes.io/certificate-arn: &lt;certificate-arn&gt;
  labels:
    app: grpcserver
  name: grpcserver
spec:
  rules:
  - host: grpc-services.dev.test.com
    http:
      paths:
      - backend:
          service:
            name: users
            port:
              number: 9090
        path: /
        pathType: Prefix  
</code></pre>
<p>This is the result</p>
<pre><code>❯ grpcurl grpc-services.dev.test.com:443 list
grpc.health.v1.Health
grpc.reflection.v1alpha.ServerReflection
user.UserService
</code></pre>
<p>Now when i add the code for emails service like below</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    alb.ingress.kubernetes.io/backend-protocol-version: GRPC
    alb.ingress.kubernetes.io/listen-ports: '[{&quot;HTTPS&quot;:443}]'
    alb.ingress.kubernetes.io/target-type: instance
    kubernetes.io/ingress.class: alb
    alb.ingress.kubernetes.io/scheme: internal
    service.beta.kubernetes.io/aws-load-balancer-internal: &quot;true&quot;
    alb.ingress.kubernetes.io/certificate-arn: &lt;certificate-arn&gt;
  labels:
    app: grpcserver
  name: grpcserver
spec:
  rules:
  - host: grpc-services.dev.test.com
    http:
      paths:
      - backend:
          service:
            name: emails
            port:
              number: 9090
        path: /emails
        pathType: Prefix
      - backend:
          service:
            name: users
            port:
              number: 9090
        path: /
        pathType: Prefix  
</code></pre>
<p>Now when i try to access this i get error</p>
<pre><code>❯ grpcurl grpc-services.dev.test.com:443/emails list
Failed to dial target host &quot;grpc-services.dev.test.com:443/emails&quot;: dial tcp: lookup tcp/443/emails: nodename nor servname provided, or not known

also tried
❯ grpcurl grpc-services.dev.test.com/emails:443 list
Failed to dial target host &quot;grpc-services.dev.test.com/emails:443&quot;: dial tcp: lookup grpc-services.dev.test.com/emails: no such host
</code></pre>
<p>I was expecting it to work as HTTP, maybe i am missing some thing.</p>
<p>Please help me.</p>
<p>Thanks,</p>

<p>gRPC uses paths in the <a href="https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests" rel="nofollow noreferrer">style of <code>/the.service.Name/methodName</code></a>. So use the service name in the <code>path</code> to separate traffic. To send all <code>UserService</code> traffic to the <code>users</code> service, use the fully-qualified service name with a forward slash on either side.</p>
<pre class="lang-yaml prettyprint-override"><code>  - host: grpc-services.dev.test.com
    http:
      paths:
      - backend:
          service:
            name: users
            port:
              number: 9090
        path: /user.UserService/
        pathType: Prefix
</code></pre>
<p>You didn't mention the service name for the emails service, so I can't provide the example configuration for it.</p>
