I want to connect to a consul service through ingress gateway. I have deployed my consul in my local minikube and generate the public ip to ingress gateway through minikube tunnel command and ingress gateway is listening on the port 8080. Also service default is created.
Below is the ingress gateway service :
consul-ingress-gateway LoadBalancer 10.97.211.68 127.0.0.1 8080:31328/TCP,8443:31657/TCP
consul-server ClusterIP None <none> 8500/TCP,8301/TCP,8301/UDP,8302/TCP,8302/UDP,8300/TCP,8600/TCP,8600/UDP
Service default :
apiVersion: consul.hashicorp.com/v1alpha1
kind: ServiceDefaults
metadata:
name: voting-consul-voting-frontend
spec:
protocol: http
Ingress Gateway :
apiVersion: consul.hashicorp.com/v1alpha1
kind: IngressGateway
metadata:
name: ingress-gateway
spec:
listeners:
- port: 8080
protocol: http
services:
- name: static-server
hosts:
- "*"
When I curl using curl -H "Host: static-server.ingress.consul" http://localhost:8080
it working but when I try with curl http://localhost:8080
it not working and getting 404 not found response. When I read documentation it was mentioned that hosts tag should solve the issue but its not. Am I missing something ?
I am expecting the below flow.
localhost:8080 --> ingress-gateway --> static-server