<p>I am implementing an ingress controller with AWS and following <a href="https://github.com/kubernetes-sigs/aws-alb-ingress-controller/blob/master/docs/walkthrough.md" rel="nofollow noreferrer">this</a> tutorial. </p>

<p>When creating an ingress as shown <a href="https://raw.githubusercontent.com/kubernetes-sigs/aws-alb-ingress-controller/master/examples/echoservice/echoserver-ingress.yaml" rel="nofollow noreferrer">here</a>, a  host name should be given.   </p>

<pre><code>spec:
  rules:
  - host: echoserver.example.com #How to let kubernate assign ALB's DNS name and not give our own DNS name.
    http:
      paths:
      - path: /
        backend:
          serviceName: echoserver
          servicePort: 80
</code></pre>

<p>But I want to give the ALB's generated DNS name as I don't have my own DNS name. Is there any way to do it ? I tried ommiting the <strong>host</strong> attribute. But when I describe the ingress as mentioned in my tutorial mentioned above (section 13) running </p>

<pre><code> kubectl describe ing -n echoserver echoserver  
</code></pre>

<p>The value of Address in the response of above command is empty, therefore no way to hit the ingress.   </p>

<p><em>UPDATE</em>:  </p>

<p>I created a ALB (through the aws UI, and allowed to forward requests to a target group which is created as default) and set its DNS name to the host name(in simple letters) in ingress yaml file. But I can't see it works. I follow the steps mentioned in above <a href="https://github.com/kubernetes-sigs/aws-alb-ingress-controller/blob/master/docs/walkthrough.md" rel="nofollow noreferrer">above tutorial</a>.  </p>

<pre>
kubectl logs -n kube-system \
    $(kubectl get po -n kube-system | \
    egrep -o alb-ingress[a-zA-Z0-9-]+) | \
    egrep -o '\[ALB-INGRESS.*$'
</pre>  

<p>When the above log command executed only the following output returned:    </p>

<pre>
[ALB-INGRESS] [controller] [INFO]: Log level read as "", defaulting to INFO. To change, set LOG_LEVEL environment variable to WARN, ERROR, or DEBUG.
[ALB-INGRESS] [controller] [INFO]: Ingress class set to alb
[ALB-INGRESS] [controller] [INFO]: albNamePrefix undefined, defaulting to f0591ff6
</pre>

<p>As per step 12, when the log command executed,  </p>

<pre>kubectl logs -n kube-system \
    $(kubectl get po -n kube-system | \
    egrep -o alb-ingress[a-zA-Z0-9-]+) | \
    egrep -o '\[ALB-INGRESS.*$' | \
    grep 'echoserver\/echoserver'
</pre>

<p>there is no any logs.   </p>

<p>Also, when following command executed:<br>
kubectl describe ing -n echoserver echoserver<br>
The response is:  </p>

<p><pre>
Name:             echoserver
Namespace:        echoserver
Address:
Default backend:  default-http-backend:80 (172.17.0.4:8080)
Rules:
  Host                                                Path  Backends
  ----                                                ----  --------
  ingress-alb-3455057285.us-east-2.elb.amazonaws.com
                                                      /   echoserver:80 ()
Annotations:
Events:  
</pre></p>

<p>Any idea please where things go wrong ?<br>
I did not set any IAM roles here. If it is required, let me know how should I do it.</p>

Débora
<p>It's not possible to use ingresses like this, ingresses expect a DNS name as they need to be able to route traffic.</p>

<p>You can get around this by simply editing your hosts file for a bit of a hack:</p>

<pre><code>my_fake_dns &lt;ip_of_alb&gt;
</code></pre>

<p>You might want to try using a <a href="https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/" rel="nofollow noreferrer">Service of type LoadBalancer</a>, which automatically generate an ELB (not an ALB) or an <a href="https://aws.amazon.com/blogs/opensource/network-load-balancer-support-in-kubernetes-1-9/" rel="nofollow noreferrer">NLB</a> for you.</p>
