<p>I am new to Kubernetes and am attempting to get <code>Ingress-Nginx</code> to work on my local k8s cluster.</p>

<p>I have it installed and running:</p>

<pre><code>$ kubectl get pods --namespace=ingress-nginx
  NAME                                       READY   STATUS    RESTARTS   AGE
  nginx-ingress-controller-76f97b74b-bbb6h   1/1     Running   0          13h
</code></pre>

<p>Then I created two nginx services (wanted to test name-based routing): </p>

<pre><code>$ kubectl get svc
  NAME         TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)        AGE
    kubernetes   ClusterIP   10.96.0.1        &lt;none&gt;        443/TCP        20h
    nginx        NodePort    10.102.188.253   &lt;none&gt;        80:32025/TCP   36m
    nginx2       NodePort    10.109.43.89     &lt;none&gt;        80:32458/TCP   35m
</code></pre>

<p>And I created my ingress:</p>

<pre><code>$ kubectl get ingress -o yaml
apiVersion: v1
items:
- apiVersion: extensions/v1beta1
  kind: Ingress
  metadata:
    creationTimestamp: 2018-10-25T12:27:44Z
    generation: 1
    name: test
    namespace: default
    resourceVersion: "98114"
    selfLink: /apis/extensions/v1beta1/namespaces/default/ingresses/test
    uid: 5fbc2e9e-d851-11e8-995f-2ae1e5e17bac
  spec:
    rules:
    - host: test-ingress.chbresser.com
      http:
        paths:
        - backend:
            serviceName: nginx
            servicePort: 80
    - host: test-ingress2.chbresser.com
      http:
        paths:
        - backend:
            serviceName: nginx2
            servicePort: 80
  status:
    loadBalancer: {}
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""
</code></pre>

<p>From my understanding that is all I was supposed to do, but its not getting an IP address:</p>

<pre><code>$ kubectl get ingress
  NAME   HOSTS                                                    ADDRESS   PORTS   AGE
    test   test-ingress.chbresser.com,test-ingress2.chbresser.com             80      33m
</code></pre>

<p>What step did I miss? Why am I not getting an IP?</p>

<p>Edit: </p>

<p><code>kubectl logs nginx-ingress-controller-76f97b74b-bbb6h --namespace=ingress-nginx:</code></p>

<pre><code>W1025 05:44:10.003587       9 queue.go:130] requeuing &amp;ObjectMeta{Name:sync status,GenerateName:,Namespace:,SelfLink:,UID:,ResourceVersion:,Generation:0,CreationTimestamp:0001-01-01 00:00:00 +0000 UTC,DeletionTimestamp:&lt;nil&gt;,DeletionGracePeriodSeconds:nil,Labels:map[string]string{},Annotations:map[string]string{},OwnerReferences:[],Finalizers:[],ClusterName:,Initializers:nil,}, err services "ingress-nginx" not found
</code></pre>

CHBresser
<p>I use Bare-metal and get IP address by using <code>--report-node-internal-ip-address=true</code> 
flag in <code>ingress-controller</code>.</p>

<p>Here is my <code>ingress-controller</code> yaml:</p>



<pre class="lang-html prettyprint-override"><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata: 
  name: nginx-ingress-controller
spec: 
  replicas: 1
  revisionHistoryLimit: 3
  template: 
    metadata: 
      labels: 
        k8s-app: ingress-nginx
    spec: 
      containers: 
        - args: 
            - /nginx-ingress-controller
            - "--default-backend-service=default/my-app"
            - "--report-node-internal-ip-address=true"
          env: 
            - name: POD_NAME
              valueFrom: 
                fieldRef: 
                  fieldPath: metadata.name
            - name: POD_NAMESPACE
              valueFrom: 
                fieldRef: 
                  fieldPath: metadata.namespace
          image: "quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.15.0"
          name: nginx-ingress-controller
          ports: 
            - containerPort: 80
              hostPort: 80
              name: http
              protocol: TCP
</code></pre>



<p>my <code>ingress</code> yaml:</p>



<pre class="lang-html prettyprint-override"><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata: 
  name: my-app
  annotations: 
    kubernetes.io/ingress.class: "nginx"
spec:
  rules:
  - host: my-app.example.com
    http: 
     paths:
     - path: /
       backend:
        serviceName: my-app
        servicePort: 80
</code></pre>



<p>and result:</p>



<pre class="lang-html prettyprint-override"><code>$ kubectl get ing
NAME     HOSTS   ADDRESS        PORTS   AGE
my-app   *       192.168.1.78   80      40h

$ kubectl get svc
NAME              TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)          AGE
kubernetes        ClusterIP   10.96.0.1        &lt;none&gt;        443/TCP          8d
my-app            ClusterIP   10.110.152.216   &lt;none&gt;        80/TCP,443/TCP   8d

$ kubectl get po
NAME                                        READY   STATUS    RESTARTS   AGE
my-app-rc-d7lw9                             1/1     Running   0          8d
my-app-rc-spvjb                             1/1     Running   0          8d
my-app-rc-tvkrw                             1/1     Running   0          8d
nginx-ingress-controller-6c6c899467-d9sg6   1/1     Running   0          16m
</code></pre>



<p>for more detail , see <a href="https://github.com/kubernetes/ingress-nginx/issues/1750" rel="nofollow noreferrer">this issues</a>.</p>
