Score:0

Consul Ingress Gateway hosts tag not working. Testing environment is minikube

mc flag

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

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.