# Problem with default ingress in Kubernetes

**URL:** <https://forums.suse.com/t/problem-with-default-ingress-in-kubernetes/5375>\
**Category:** General\
**Created:** [February 1, 2017, 3:29am UTC](https://forums.suse.com/t/problem-with-default-ingress-in-kubernetes/5375 "2017-02-01T03:29:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryanwalls](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/ryanwalls/32/2762_2.png) [@ryanwalls](https://forums.suse.com/u/ryanwalls)\
**Post date:** [February 1, 2017, 3:29am UTC](https://forums.suse.com/t/problem-with-default-ingress-in-kubernetes/5375/1 "2017-02-01T03:29:33Z")

</div>

Per the documentation here: [https://kubernetes.io/docs/user-guide/ingress/#name-based-virtual-hosting](https://kubernetes.io/docs/user-guide/ingress/#name-based-virtual-hosting), Kubernetes recommends the idea of a default backend when doing host based routing so that you can serve up a 404 or other page.

It doesn’t appear that the rancher ingress setup supports this case. Here’s my ingress yaml:

```auto
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: simplelb
spec:
  backend:
    serviceName: nginx3
    servicePort: 80
  rules:
  - host: test1-qa.myserver.com
    http:
      paths:
      - backend:
          serviceName: nginx1
          servicePort: 80
  - host: test2-qa.myserver.com
    http:
      paths:
      - backend:
          serviceName: nginx2
          servicePort: 80

```

Basically, I expect requests with no host header to route to my `nginx3` service. But instead I get a 503.

Is this something Rancher intends to support?

---

<div class="post-metadata">

**Author:** ![ryanwalls](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/ryanwalls/32/2762_2.png) [@ryanwalls](https://forums.suse.com/u/ryanwalls)\
**Post date:** [February 1, 2017, 3:28pm UTC](https://forums.suse.com/t/problem-with-default-ingress-in-kubernetes/5375/2 "2017-02-01T15:28:50Z")

</div>

This was my fault.

My service `nginx3` was not running, which caused the LB to not add the default rule when it was created.

The controller is working as expected. Thanks rancher folks.

Leaving this here in case someone hits a similar problem. Lesson learned: Make sure your services are running before creating the ingress.
