<p>I'm trying to use the kubernetes ingress resource on bare metal with no cloud provider. </p>

<p>I created an ingress resource:</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: nginx
spec:
  rules:
  - host: foobar.com
    http:
      paths:
      - path: /foo
        backend:
          serviceName: echoheaders-x
          servicePort: 80
      - path: /
        backend:
          serviceName: frontend
          servicePort: 80
</code></pre>

<p>however, when I view the ingress, I get this IP:</p>

<pre><code>[root@kubemaster]# kubectl get ing
NAME      HOSTS       ADDRESS      PORTS     AGE
nginx     foobar.com   172.17.0.1   80        12m
</code></pre>

<p>That IP address seems to correspond with the docker0 IP address on all my kubelet nodes.</p>

<p>Is there a way to set this IP? All the tutorial's I've read seem to have this IP be routable.</p>

<p>Here's my nginx-controller yaml:</p>

<pre><code>---
apiVersion: v1
kind: ReplicationController
metadata:
  name: nginx-ingress-controller
  labels:
    k8s-app: nginx-ingress-lb
spec:
  replicas: 1
  selector:
    k8s-app: nginx-ingress-lb
  template:
    metadata:
      labels:
        k8s-app: nginx-ingress-lb
        name: nginx-ingress-lb
    spec:
      terminationGracePeriodSeconds: 60
      containers:
      - image: gcr.io/google_containers/nginx-ingress-controller:0.8.3
        name: nginx-ingress-lb
        imagePullPolicy: Always
        readinessProbe:
          httpGet:
            path: /healthz
            port: 10254
            scheme: HTTP
        livenessProbe:
          httpGet:
            path: /healthz
            port: 10254
            scheme: HTTP
          initialDelaySeconds: 10
          timeoutSeconds: 1
        # use downward API
        env:
          - name: POD_NAME
            valueFrom:
              fieldRef:
                fieldPath: metadata.name
          - name: POD_NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
        ports:
        - containerPort: 80
          hostPort: 80
        - containerPort: 443
          hostPort: 443
        # we expose 18080 to access nginx stats in url /nginx-status
        # this is optional
        - containerPort: 18080
          hostPort: 18080
        args:
        - /nginx-ingress-controller
        - --default-backend-service=$(POD_NAMESPACE)/default-http-backend
        - --nginx-configmap=$(POD_NAMESPACE)/nginx-ingress-controller
</code></pre>

<p>The issue here was the kubelet configuration. By default, the kubelet will listen on <code>0.0.0.0</code> and because <code>docker0</code> is the first available address, it grabbed <code>docker0</code>'s IP.</p>

<p>I added the following to the kubelet config:</p>

<pre><code>--address=&lt;actualip&gt; --node-ip=&lt;actualip&gt;
</code></pre>

<p>And it registered correctly.</p>
