Setup Envoy as Ingress Gateway

Hi @bbuddha,

When an ingress is configured with an HTTP listener, applications must send an HTTP Host header with the configured (or default) hostname for the backend service in order for the request to be correctly routed. This is documented on the Hosts of the ingress gateway config entry.

Hosts (array<string>: <optional>) - A list of hosts that specify what requests will match this service. This cannot be used with a tcp listener, and cannot be specified alongside a * service name. If not specified, the default domain .ingress.* will be used to match services. Requests must send the correct host to be routed to the defined service.

Given the configuration you provided, you would need to use the following curl command to reach your backend service.

$ curl --header "Host: counting.ingress.consul" http://${vm_ip}:8080/

If your applications outside of the mesh are configured to use Consul for DNS resolution, then they can use an ingress service lookup to find the IP address of the gateway(s) associated with a given service. For example:

$ curl http://counting.ingress.consul:8080/

I hope this information is helpful. Let me know if you have any questions.