<p>Am installing nginx-controller to expose the service, after installing the ingress resource am not able to hit the desired port. i get failed saying the below,</p>
<pre><code>[root@k8-m smartrem]# kubectl describe ingress ingress-svc
Name:             ingress-svc
Namespace:        default
Address:
Default backend:  default-http-backend:80 (&lt;error: endpoints &quot;default-http-backend&quot; not found&gt;)
Rules:
  Host          Path  Backends
  ----          ----  --------
  auditmee.com
                /swagger-ui.html   springboot-service:8080 (192.168.157.76:8080,192.168.157.77:8080,192.168.250.8:8080)
Annotations:    &lt;none&gt;
Events:         &lt;none&gt;
</code></pre>
<p>I see the errors are related to default-http-backend, how to create the default-http-backend service.</p>
<p>Any help would be highly appreciated</p>

Vicky
<p>There are several parts in this question, I do think need to be addressed:</p>
<hr />
<ol>
<li>There are multiple <code>NGINX Ingress Controllers</code> available to use within Kubernetes environment. Specifying which exact one is used will definitely help in troubleshooting process as there could be slight differences in their inner workings that could affect your workload.</li>
</ol>
<p>You can read more about this topic (<code>NGINX</code> based <code>Ingress</code> controllers) by following this thread:</p>
<ul>
<li><em><a href="https://github.com/nginxinc/kubernetes-ingress/blob/master/docs/nginx-ingress-controllers.md" rel="nofollow noreferrer">Github.com: Nginxinc: Kubernetes Ingress: Blob: Master: Docs: Nginx Ingress controllers</a></em></li>
</ul>
<blockquote>
<p>A side note!</p>
<p>I saw you're using this specific <code>Ingress</code> controller as per previous question asked on StackOverflow:</p>
<ul>
<li><a href="https://github.com/nginxinc/kubernetes-ingress" rel="nofollow noreferrer">https://github.com/nginxinc/kubernetes-ingress</a></li>
</ul>
</blockquote>
<hr />
<ol start="2">
<li>What is a <code>default-backend</code>?</li>
</ol>
<p><code>default-backend</code> in short is a &quot;place&quot; (<code>Deployment</code> with a <code>Pod</code> and a <code>Service</code>) <strong>where all the traffic that doesn't match <code>Ingress</code> resource is sent</strong> (for example unknown <code>path</code>).</p>
<p>Your <code>Ingress</code> resource is displaying following message:</p>
<blockquote>
<p><code>default-http-backend:80 (&lt;error: endpoints &quot;default-http-backend&quot; not found&gt;)</code></p>
</blockquote>
<p>As it can't find an <code>Endpoint</code> named <code>default-http-backend</code> (with associated <code>Service</code> of the same name). To fix that you'll need to provision such resources.</p>
<p>Example of such <code>default-backend</code> implementation:</p>
<ul>
<li><em><a href="https://github.com/uswitch/ingress/blob/master/deploy/default-backend.yaml" rel="nofollow noreferrer">Github.com: Uswitch: Master: Deploy: default-backend.yaml</a></em></li>
</ul>
<hr />
<ol start="3">
<li><code>Ingress</code> resources and it's <code>path</code></li>
</ol>
<p>As for your <code>Ingress</code> resource. It's crucial to include <code>YAML</code> manifests for resources you are deploying. It's easier for other community member to see the whole pictures and the potential issues you are facing.</p>
<p>By the part of the: <code>$ kubectl describe ingress ingress-svc</code> it can be seen:</p>
<pre class="lang-sh prettyprint-override"><code>Rules:
  Host          Path  Backends
  ----          ----  --------
  auditmee.com
                /swagger-ui.html   springboot-service:8080 (192.168.157.76:8080,...) 
</code></pre>
<p>There is a host: <code>HOST.com</code> that have one really specific path (file to be exact). <strong>Setup like this will allow your client to have access only to <code>swagger-ui.html</code>. If you had some other files, there wouldn't be available</strong>:</p>
<ul>
<li><code>curl http://HOST/swagger-ui.html</code> &lt;-- <code>200</code></li>
<li><code>curl http://HOST/super-awesome-icon.png</code> &lt;-- <code>404</code></li>
</ul>
<blockquote>
<p>A side note!</p>
<p>Also please check on which protocol <code>HTTP</code>/<code>HTTPS</code> are you serving your resources.</p>
</blockquote>
<p>As your workload is unknown to us, you could try to set your <code>path</code> to <code>path: /</code>. This rule would allow all request for resources for <code>HOST</code> to be passed to your <code>springboot-service</code>.</p>
<hr />
<p>I encourage you to check available documentation for more resources:</p>
<ul>
<li><em><a href="https://kubernetes.io/docs/concepts/services-networking/ingress/" rel="nofollow noreferrer">Kubernetes.io: Docs: Concepts: Services networking: Ingress</a></em></li>
<li><em><a href="https://github.com/nginxinc/kubernetes-ingress" rel="nofollow noreferrer">Github.com: Nginxinc: Kubernetes Ingress</a></em>:
<ul>
<li><em><a href="https://github.com/nginxinc/kubernetes-ingress/tree/master/examples/complete-example" rel="nofollow noreferrer">Github.com: Nginxinc: Kubernetes Ingress: Examples: Complete example</a></em></li>
</ul>
</li>
</ul>
<p>I also found displaying logs of the <code>Ingress</code> controller to be highly effective in troubleshooting:</p>
<ul>
<li><code>$ kubectl logs -n NAMESPACE INGRESS-POD-NAME</code></li>
</ul>
