<p>Rancher service:</p>

<pre><code>$ kubectl get svc
NAME         TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)          AGE
rancher      ClusterIP   10.10.17.245   &lt;none&gt;        80/TCP,443/TCP   1h
</code></pre>

<p>Ingress controller service:</p>

<pre><code>NAMESPACE       NAME                   TYPE           CLUSTER-IP     EXTERNAL-IP      PORT(S)                      AGE
nginx-ingress   nginx-ingress          LoadBalancer   10.10.15.181   &lt;ext-IP&gt;   80:30324/TCP,443:31022/TCP   3h
</code></pre>

<p>Ingress role:</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: rancher-ing
  annotations:
    kubernetes.io/ingress.class: "rancher"
spec:
  rules:
  - host: api.sample.com
    http:
      paths:
      - path: /
        backend:
          serviceName: rancher
          servicePort: 443
</code></pre>

<p>Ingress:</p>

<pre><code>$ kubectl get ingress
NAME      HOSTS            ADDRESS   PORTS     AGE
rancher   api.sample.com             80        19s
</code></pre>

<p>When I am trying to reach rancher over the ingress controller ext-IP:</p>

<blockquote>
  <p>$ curl <a href="http://api.sample.com" rel="nofollow noreferrer">http://api.sample.com</a></p>
</blockquote>

<p>As a response I have some not encoded string. If I do it thru web browser this string will be downloaded and I have got 404.<br>
Similar role for some random service over http (without https) works fine so it's not a matter of wrong ingress controller configuration.</p>

s_z_p
<p>If you want to use <code>kubernetes.io/ingress.class: "rancher"</code> you have to deploy your ingress controller with the <code>--ingress-class=rancher</code> annotation.</p>

<p>Have a lot at 
<a href="https://github.com/nginxinc/kubernetes-ingress/tree/master/examples/multiple-ingress-controllers" rel="nofollow noreferrer">https://github.com/nginxinc/kubernetes-ingress/tree/master/examples/multiple-ingress-controllers</a> and <a href="https://kubernetes.github.io/ingress-nginx/user-guide/multiple-ingress/" rel="nofollow noreferrer">https://kubernetes.github.io/ingress-nginx/user-guide/multiple-ingress/</a></p>

<p>Cheers</p>
