<p>I expose my nginx service through traefik ingress controller. Unfortunately, it results with 503 error.</p>

<pre><code>$ kubectl create deployment nginx --image=nginx
$ kubectl expose deployment nginx --port=80
</code></pre>

<p>My traefik ingress configuration following <a href="https://docs.traefik.io/v1.7/user-guide/kubernetes/#name-based-routing" rel="nofollow noreferrer">this</a> documentation.</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: example
  annotations:
    kubernetes.io/ingress.class: traefik
spec:
  rules:
  - host: example.com
    http:
      paths:
      - path: /
        backend:
          serviceName: nginx
          servicePort: http
</code></pre>

Lukasz Dynowski
<p>It turned out that, I had to change <code>servicePort: http</code> to <code>servicePort: 80</code> and this fixed the problem.</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: example
  annotations:
    kubernetes.io/ingress.class: traefik
spec:
  rules:
  - host: example.com
    http:
      paths:
      - path: /
        backend:
          serviceName: nginx
          servicePort: 80
</code></pre>
