I have a grpc application installed in AWS EKS. The grpc endpoint works successfully with port forwarding:
grpcurl -plaintext -protoset-out=reflection.protoset localhost:8080 list
grpc.health.v1.Health
grpc.reflection.v1alpha.ServerReflection
I've installed nginx-ingress via the helm chart, and set the following configuration:
USER-SUPPLIED VALUES:
controller:
service:
annotations:
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: <cert-arn>
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "443"
service.beta.kubernetes.io/aws-load-balancer-type: nlb
targetPorts:
https: 443
This has successfully created an NLB with listeners, one for HTTP and one for TLS with the cert attached.
I've then created an ingress like so:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/backend-protocol: GRPC
nginx.ingress.kubernetes.io/ssl-redirect: "true"
generation: 7
labels:
name: <app>
name: <svc-name>
namespace: <ns>
spec:
ingressClassName: nginx
rules:
- host: <app>.development.<domain>
http:
paths:
- backend:
service:
name: <svc>
port:
number: 80
path: /
pathType: ImplementationSpecific
tls:
- hosts:
- <app>.development.<domain>
secretName: dev-tls
status:
loadBalancer:
ingress:
- hostname: <loadbalancer>
You'll notice I'm also terminating TLS with cert-manager/lets-encrypt at the ingress as well, as I believe that's required.
External DNS is correctly creating a record in route53 and the certificate is being fetched from let's encrypt. However, no matter what I do, grpc curl is not working and throws "context deadline exceed"
grpcurl -protoset-out=reflection.protoset <app>.development.<domain>:443 list
Failed to dial target host "<app>.development.<domain>:443": context deadline exceeded
What am I missing here? Other things I've tried:
Setting the ALPN policy on the TLS listener to HTTP/2 only Using an ALB ingress controller (yes, really!) same issue
EDIT: Have also verified this isn't an application problem with a sample grpc app
EDIT 2: Using a service Type=LoadBalancer
and bypassing nginx-ingress entirely works, so this definitely seems like an issue with nginx-ingress