I have a problem with one of our microservices, the application running on pod and reachable via https://, but when I use Ingress i see in the kong proxy logs the upstream something like that
2020/09/16 09:19:50 [error] 22#0: *4915538 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 10.0.3.99, server: kong, request: “GET /service HTTP/2.0”, upstream: http:// 18.104.22.168:443/
This is my ingress configuration
- host: domain .com
- path: /service
Do you see the same issue if you move the
protocol annotation onto your Service?
There are, somewhat confusingly, two similarly-named annotations in this area, protocol (singular) for Services, which corresponds to the
protocol setting on Kong services, and protocols (plural) for Ingresses, which corresponds to the
protocols setting on Kong routes.
The similar naming is because these address the same concept on different sides of the connection:
protocol controls whether the Kong proxy uses HTTP or HTTPS when communicating with the upstream service, and
protocols controls whether clients can use HTTP and/or HTTPS when connecting to the Kong proxy.
In your case, you need the former, and it must be present on the Service referenced by the Ingress (
backend.serviceName: service) rather than the Ingress itself.
Thanks for your help, it works